I am attempting to query a Pandas Dataframe with DuckDB that I materialize with read_sql_query.
Some of this data is stored in a JSON format and in the target column each value has a list of items - ["Value1", "Value2", "Valueetc"] that from the point of view of DuckDB is just a VARCHAR column.
My goal was to convert the string that looks like a list to an actual list in the DDB context -
STRING_SPLIT(REPLACE(REPLACE(REPLACE(ColumnName, '"',''),'[',''),']',''),',') AS ColumnName
I can definitely remove the quotes and brackets and return a list with this approach but I was hoping there's a less ugly/more idiomatic way to accomplish the goal.