Reputation: 113
I have a CSV file in which one column is a list of tuples. But when I am reading it in python the list of tuples is read as a string object.
Upvotes: 0
Views: 608
Reputation: 339
Read csv using pandas, using following function
pandas.read_csv()
It will read list as string. To convert it into list use following function
import ast
ast.literal_eval()
Upvotes: 1