I have a problem after changing reading the excel file from pd.read_excel() to pd.read_csv() for below code.
When using pd.read_excel(), no below error pops up,but for performance issue, I still need to use pd.read_csv().
I have tried to changemany thanks in advance:
t_date=pd.read_csv('D:/data.csv',encoding='utf-8',parse_dates=True)
t_date['Item Creation Date'] = t_date['Item Creation Date'].fillna('')
t_date['Item Creation Date']=pd.to_datetime(t_date['Item Creation Date'])
t_date['Order_WK']=t_date[['Item Creation Date']].apply(lambda x:(x['Item Creation Date']+relativedelta(weekday=SU)).strftime("%Y%m%d"),axis=1)
TypeError: ('can only concatenate str (not "relativedelta") to str', 'occurred at index 0')