How do I convert timestamp to datetime.date in pandas dataframe?

For me this works:

from datetime import datetime
df[ts] = [datetime.fromtimestamp(x) for x in df[ts]]

I got some help from a colleague.

This appears to solve the problem posted above

pd.to_datetime(df['mydates']).apply(lambda x: x.date())


Another question was marked as dupe pointing to this, but it didn't include this answer, which seems the most straightforward (perhaps this method did not yet exist when this question was posted/answered):

The pandas doc shows a pandas.Timestamp.to_pydatetime method to "Convert a Timestamp object to a native Python datetime object".


Much simpler than above:

df['mydates'].dt.date