Kindly, somone help me with this code. I’m doing data manipulation with Pandas, specifically the page visits funnel project. I’m doing it on Jupyter Notebook but it’s throwing a TypeError: unsupported operand type(s) for -: ‘str’ and ‘str’
However, on codecademy’s script.py the same code runs without an error. What could be the issue?
all_data = visits.merge(cart, how = ‘left’).merge(checkout, how = ‘left’).merge(purchase, how = ‘left’)
all_data[‘time_to_purchase’] = all_data.purchase_time - all_data.visit_time