Python Forum
How do I merge df1 and df2 by two columns?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I merge df1 and df2 by two columns?
#1
Hello, everyone! Help-me, please...

How do I merge df1 and df2 by two columns (fiels) at clausula on?

For example:

dfUltStatus = pd.merge(dfUltStatus, dfDescStatus,
on=['CODIGO_STATUS','SUB_CODIGO_STATUS'], how = 'left')
The object is merge the two data frames through these two fields to bring the description field.

Tks by your help, friends!
Reply


Messages In This Thread
How do I merge df1 and df2 by two columns? - by lucianaalsouza - May-05-2020, 06:46 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020