I am trying to transform a pandas series which has dates in it. I'd like to take the date that is in there and return the following Monday.
Here is what I have tried:
db['date'] = datetime.date.fromisocalendar(db['date'].dt.year.astype(np.int64),(db['date'].dt.week+1).astype(np.int64),1)
But I get the following error:
TypeError: 'Series' object cannot be interpreted as an integer
Is there a better way to do this?
I think this is pretty good: