Two columns in a csv file as below. I want to check the date intervals of each,
i.e.
'2013-11-01' - '2013-10-08',
'2013-12-02' - '2013-11-01' etc.
After,
df = pd.read_csv(f, sep='\t')
df_date = df["Date"]
I tried:
print (df["Date"].shift(-1) - df["Date"]).astype('timedelta64[d]')
and
print df['Date'].shift() - df['Date']
both of them returned:
TypeError: unsupported operand type(s) for -: 'str' and 'str'
What went wrong, and how can I correct it? Thank you.
