When I read a csv file to pandas dataframe, each column is cast to its own datatypes. I have a column that was converted to an object. I want to perform string operations for this column such as splitting the values and creating a list. But no such operation is possible because its dtype is object. Can anyone please let me know the way to convert all the items of a column to strings instead of objects?
I tried several ways but nothing worked. I used astype, str(), to_string etc.
a=lambda x: str(x).split(',')
df['column'].apply(a)
or
df['column'].astype(str)