kor icon indicating copy to clipboard operation
kor copied to clipboard

Add embedded lists and embedded objects support to CSV encoder

Open eyurtsev opened this issue 1 year ago • 3 comments

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.

eyurtsev avatar Apr 27 '23 01:04 eyurtsev

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.

ritiksahni avatar May 27 '23 14:05 ritiksahni

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.

eyurtsev avatar May 28 '23 02:05 eyurtsev

Understood, thank you very much.

ritiksahni avatar May 28 '23 08:05 ritiksahni