I'm trying to add a column to a dataframe based on another existing columns
the dataframe is in the following format
col1 col2
2017-02-1 2017-03-03
2017-02-22 2017-03-06
from datetime import datetime
date_format = "%Y-%m-%d"
df['TimeConsumed']=df['col2'].apply(lambda x: (datetime.strptime(x,date_format)-datetime.strptime(df['col1'],date_format)).days)
run the above and it keeps getting
TypeError: must be string, not Series
anyone please a little help ?