How can I string-split a string field into a list field in Arrow Datafusion? #4605
-
|
I have a CSV-file people.csv which looks like this: I can read the file like this: 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. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
This is now possible with Equivalent DataFrame API: https://docs.rs/datafusion/latest/datafusion/functions_nested/expr_fn/fn.string_to_array.html |
Beta Was this translation helpful? Give feedback.
This is now possible with
string_to_arrayfunctionEquivalent DataFrame API: https://docs.rs/datafusion/latest/datafusion/functions_nested/expr_fn/fn.string_to_array.html