xxxxxxxxxx
df['time'] = df['time'].apply(lambda x: x.value)
xxxxxxxxxx
import pandas as pd
df = pd.DataFrame({'time': [pd.to_datetime('2019-01-15 13:25:43')]})
df_unix_sec = pd.to_datetime(df['time']).astype(int)/ 10**9
print(df_unix_sec)
xxxxxxxxxx
FutureWarning: casting datetime64[ns] values to int64 with .astype( ) is deprecated and will raise in a future version. Use .view( ) instead.