I have a pandas dataframe looking like this:
Name start end A 2000-01-10 1970-04-29
I want to add a new column providing the
A much simpler way is to use date_range function and calculate length of the same
startdt=pd.to_datetime('2017-01-01') enddt = pd.to_datetime('2018-01-01') len(pd.date_range(start=startdt,end=enddt,freq='M'))