Код: Выделить всё
s = pl.Series("a", ["111","123","101"])
s
shape: (3,)
Series: 'a' [str]
[
"111"
"123"
"101"
]
Я нашел рабочее решение, но не уверен, что оно оптимально.
Код: Выделить всё
s.str.split("").list.eval(pl.element().str.to_integer(base=10))
shape: (3,)
Series: 'a' [list[i32]]
[
[1, 1, 1]
[1, 2, 3]
[1, 0, 1]
]
Подробнее здесь: https://stackoverflow.com/questions/763 ... ts-to-list
Мобильная версия