Skip to content Skip to sidebar Skip to footer

Merging And Transposing Columns In Python Gives Typeerror: '>' Not Supported Between Instances Of 'int' And 'datetime.datetime'

I will give a minimum sample of the two dataframe, Search_Exits and Page_Exits that I am trying to merge/transpose and the code I am using. Search_Exits Search_Term No._of_Sear

Solution 1:

Actually, it looks like I figured out what I wanted using a pivot table:

Page_Exits = Page_Exits.pivot(index='Search_Term', 
columns='Exit_Pages_actual', values='Ratios').reset_index()

followed by a regular merge using pd.merge....

Post a Comment for "Merging And Transposing Columns In Python Gives Typeerror: '>' Not Supported Between Instances Of 'int' And 'datetime.datetime'"