Pivoting out Datetimes and then calling an operation in Pandas/Python -
I have seen many articles about using datetime and datetime to convert to datetime objects.
However, I can not find a column to convert to a datetime object, so I can pivot that column and act against it.
I have dataframe like:
Col1 colonel 2 one 1/1/2013 1/12/2013 b 1/5/2013 b 4/3/2013 What do I need: pivott = pivot_table (df, rows = 'col1', values = 'col2', etc.) And then I want to get the boundaries of dates, each value in Col1) I'm not sure how to contact this properly
df Even after using ['col2'] = pd.to_datetime (df ['col2']) I could not take action against it since the date and String ...
Any advice?
Use Data Time Datetime
pd.read_csv ('somedata.csv') Convert Data Time Convert = DF ['DATE_TIME_IN_STRING'] Convert [ConvertDateTime] Convert [: 10] # You should get DTP: datetime64 [lambda D: datetime.strptime (d, '% d /% m /%) Y' Ns]
Comments
Post a Comment