0

I have two data frames I am trying to merge them with a common column called ID, the dtype of ID in df1 is object, and dtype of ID in df2 is int. in this case can I directly go with pd.merge. or do I need to change the dtype. Can someone please explain some basis on this.

Rebel_09
  • 13
  • 5
  • You must have compatible types for the merging objects (i.e. the same hash), not necessarily the column dtype. – mozway Jun 10 '22 at 07:20
  • so how do i check that, I am a beginner. Like how to I proceed with this merge function, with the currect case I get very few rows after merge which should not be the case. There should be lot more row i tried to do the same in excel – Rebel_09 Jun 10 '22 at 07:29
  • please provide a reproducible example (data and your merging code) – mozway Jun 10 '22 at 07:30

0 Answers0