Python, Can't Transform Date Array to days
I have this csv file "rfm_data.csv": CustomerID PurchaseDate TransactionAmount ProductInformation 8814 11-04-23 943.31 Product C 2188 11-04-23 463.70 Product A 4608 11-04-23 80.28 Product A 2559 11-04-23 221.29 Product A I read and transform data with this code: data = pd.read_csv("rfm_data.csv") data[‘PurchaseDate’] = pd.to_datetime(data[‘PurchaseDate’], format=’%d-%m-%y’) data[‘Recency’] = (datetime.now().date() – data[‘PurchaseDate’].dt.date).dt.days When I print (data) I… Read More Python, Can't Transform Date Array to days