Код: Выделить всё
df = pl.DataFrame({
"tags": ['{"ref":"@1", "area": "livingroom", "type": "elec"}', '{"ref":"@2", "area": "kitchen"}', '{"ref":"@3", "type": "elec"}'],
"name": ["a", "b", "c"],
})
Код: Выделить всё
┌────────────────────────────────────────────────────┬──────┐
│ tags ┆ name │
│ --- ┆ --- │
│ str ┆ str │
╞════════════════════════════════════════════════════╪══════╡
│ {"ref":"@1", "area": "livingroom", "type": "elec"} ┆ a │
│ {"ref":"@2", "area": "kitchen"} ┆ b │
│ {"ref":"@3", "type": "elec"} ┆ c │
└────────────────────────────────────────────────────┴──────┘
Как этого добиться (в идеале, используя собственный API выражений)?
Подробнее здесь: https://stackoverflow.com/questions/783 ... ing-column
Мобильная версия