I can't seem to get a time stamp into a unix timestamp format and assume I'm missing some points. Looking for some help.
I have a column within a df that is a datetime object in the format: YYYY-MM-DD HH:MM:SS and I need a new column with the unix stamp.
I'm bringing the csv into python with:
gps = filepath here
dateparse= lambda x: pd.datetime.strptime(x, '%Y%m%d %H:%M:%S')
gps_dat = pd.read_csv(gps, parse_dates=['date_stamp'],date_parser=dateparse)
Anytime I try to change this column into a unix stamp I'm getting an error about wrong format or "datetime.datetime" has no attribute "datetime" with this:
gps_dat['unix']=datetime.datetime(gps_dat['date_stamp'])
Should I be using
calendar.timegm(tuple)
I'm still learning so any help would be greatly appreciated!