below are my codes
df = pd.DataFrame({'Date' : ['2014-03-27', '2014-03-28', '2014-03-31', '2014-04-01', '2014-04-02', '2014-04-03', '2014-04-04', '2014-04-07','2014-04-08', '2014-04-09'],
})
df['Date'] = pd.to_datetime(df['Date'])
df['days'] = df['Date'].shift(-1) - df['Date']
The output I get is something like this
But I want the output in the form of integer not timedelta. is there an easy way to convert in the codes?