I have a dataframe with some (hundreds of) million of rows. And I want to convert datetime to timestamp effectively. How can I do it?
My sample df:
df
I think you should not use apply, simply astype would be fine:
astype
df['ts'] = df.datetime.astype('int64') // 10**9