What I need to do is convert 'year-month-day' timestamp to Unix time stamp do somethings with it then change it back to date time series. I am working with '1999-09-07' as my timestamp. I am getting an error : invalid literal for int() with base 10: '1999-09-07'
df1['timestamp'] = df1['timestamp'].astype(np.int64) // 10**9
#Got back this
ERROR:invalid literal for int() with base 10: '1999-09-07'
df1 = pd.read_csv('stock_CSV/' + ticker + '.csv')
pd.to_datetime(df1['timestamp'],unit='ns', origin='unix')
df1['timestamp'] = df1['timestamp'].astype(np.int64) // 10**9
#
#....some code
#
pd.to_datetime(df1['timestamp'], unit='s')
What I am expecting is a my dates converted to unix timestamp then converted back