I have a data frame which looks like this:
Col1, Col 2, Col3
'abc', (1,2), [(1,2), (3,4)]
'xyz', (3,4), [(1,2), (3,4), (5,6)]
I have written the data frame to file using df.to_csv("dataframe.csv")
When I read the dataframe by file = pd.read_csv("dataframe.csv"), I get Col2 and Col3 as strings.
However, I would like to read Col2 as a tuple, and Col3 as a list of tuples.
How can I do that? Alternatively, is there another way that I should write the data frame to file, so that I can read the columns in the desired formats?