I have a dataframe like the following
print (df)
T
0 1573119509
1 1573119512
2 1573119517
3 1573119520
I would like to convert the column T to a date. This is what I am doing:
df['Td'] = pd.to_datetime(df['T']).apply(lambda x: x.date())
but it returns:
print (df)
T Td
0 1573119509 1970-01-01
1 1573119512 1970-01-01
2 1573119517 1970-01-01
3 1573119520 1970-01-01