GitHub user WijnandOntoforce closed a discussion: How can I string-split a 
string field into a list field in Arrow Datafusion?

I have a CSV-file people.csv which looks like this:
```
name;age;hobbies
Alice;25;dance,music
Bob;30;music
Charlie;28;football,tv
```
I can read the file like this:
```
let people = ctx.read_csv("people.csv", 
CsvReadOptions::new().has_header(true).delimiter(';' as u8)).await?;
```
This results in the field 'hobbies' being a single string (Utf8) field. 
However, its values are comma-separated strings. I would like to transform that 
field into a "list-of-string" field by splitting the strings on comma.
Is this possible in DataFusion? I know that Arrow has list-type, but I'm not 
sure whether DataFusion supports or allows this.
(I'm using the dataframe API, not SQL)

GitHub link: https://github.com/apache/datafusion/discussions/4605

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to