kor
kor copied to clipboard
Add embedded lists and embedded objects support to CSV encoder
CSV encoder only works with flat objects at the moment, it would be nice to add support for embedded lists and embedded objects. Embedded lists are a particularly common extraction item.
Hey, I came across your project (looks pretty cool) and I was reading the list of issues.
I am learning programming and I have a question - What is an embedded list/object? I can see you're referring to CSV files here but I don't understand what an embedded list is in reference to CSV data.
hi @ritiksahni,
By embedded list or object, i mean putting a list or an object as the value of a particular column for a given row.
For example, here's the first (and only) record of the dataframe below has a list of [1, 2, 3] for the value of column 'b'
pd.DataFrame([{'a': 1, 'b': [1, 2, 3]}]).to_csv()
There's a nearly finished PR here: https://github.com/eyurtsev/kor/pull/144.
Understood, thank you very much.