for time in df[col]: datetime.datetime.fromtimestamp(int(time))
Why is not updating directly the dataframe df[col]? My aim is to update one column of a data frame with new date format.
I solved; I creat a list and update the related column of the dataframe with the list.
a_list=datetime.datetime.fromtimestamp(int(time)) df[col]=a_list
2.1m questions
2.1m answers
60 comments
57.0k users