When I use the command:
data['DATE_KEY']=pd.to_datetime(data.DATE_KEY)
it returns the timestamp in the format 'yyyy-mm-dd' and I would like it to also return the other content in that timestamp. How do I do this?
The format of the original data is posted the previous question: Bigquery Error When Loading Timestamp
This is the full code that I am using:
data=pd.read_csv('original_data.csv', index_col=False)
data['DATE_KEY']=pd.to_datetime(data.DATE_KEY)
useful_columns = ['DATE_KEY','ITEM_DESCRIPTION','SCAN_UNITS','AVE_UNIT_PRC', 'SCAN_DOLLARS']
data[useful_columns].to_csv('new_data.csv', index=False, sep=",")
