I have a python dataframe with a 'date' column with ~200 elements in the format yyyy-mm-dd.
I have a 2nd column (in the same dataframe) with the number of days (these days vary...sometime 1, sometime 360), but always integers.
I want to add the two up.
The date column is of type datetime64 [ns], and 'days' column is type int64.
truely stuck. I Can find lots of examples where the days are constant, but nothing where the days are in a column.
Please help.
Is this what you are looking for? Pandas has its own date time and timedelta module to make things easier.
Sample Dataframe:
O/P
Code to add days from second column to the first column:
O/P