При наличии фрейма данных
Код: Выделить всё
df = pl.DataFrame({
"A":[["Hi", "my", "is"],["I am"]],
"B":[["there", "name", "mr.x"], ["smart"]]
})
Код: Выделить всё
shape: (2, 2)
┌────────────────────┬───────────────────────────┐
│ A ┆ B │
│ --- ┆ --- │
│ list[str] ┆ list[str] │
╞════════════════════╪═══════════════════════════╡
│ ["Hi", "my", "is"] ┆ ["there", "name", "mr.x"] │
│ ["I am"] ┆ ["smart"] │
└────────────────────┴───────────────────────────┘
Код: Выделить всё
shape: (2, 1)
┌────────────────────────────────────┐
│ A │
│ --- │
│ list[str] │
╞════════════════════════════════════╡
│ ["Hi;there", "my;name", "is;mr.x"] │
│ ["I am;smart"] │
└────────────────────────────────────┘
Подробнее здесь: https://stackoverflow.com/questions/791 ... pe-of-list
Мобильная версия