Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7799283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:15:30+00:00 2026-06-02T00:15:30+00:00

I like to think I’m not an idiot, but maybe I’m wrong. Can anyone

  • 0

I like to think I’m not an idiot, but maybe I’m wrong. Can anyone explain to me why this isn’t working? I can achieve the desired results using ‘merge’. But I eventually need to join multiple pandas DataFrames so I need to get this method working.

In [2]: left = pandas.DataFrame({'ST_NAME': ['Oregon', 'Nebraska'], 'value': [4.685, 2.491]})

In [3]: right = pandas.DataFrame({'ST_NAME': ['Oregon', 'Nebraska'], 'value2': [6.218, 0.001]})

In [4]: left.join(right, on='ST_NAME', lsuffix='_left', rsuffix='_right')
Out[4]: 
  ST_NAME_left  value ST_NAME_right  value2
0       Oregon  4.685           NaN     NaN
1     Nebraska  2.491           NaN     NaN
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T00:15:32+00:00Added an answer on June 2, 2026 at 12:15 am

    Try using merge:

    In [14]: right
    Out[14]: 
        ST_NAME  value2
    0    Oregon   6.218
    1  Nebraska   0.001
    
    In [15]: merge(left, right)
    Out[15]: 
        ST_NAME  value  value2
    0  Nebraska  2.491   0.001
    1    Oregon  4.685   6.218
    
    In [18]: merge(left, right, on='ST_NAME', sort=False)
    Out[18]: 
        ST_NAME  value  value2
    0    Oregon  4.685   6.218
    1  Nebraska  2.491   0.001
    

    DataFrame.join is a bit of legacy method and apparently doesn’t do column-on-column joins (originally it did index on column using the on parameter, hence the “legacy” designation).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I think that some newer languages like JS can do this natively, but I
Can someone explain why this doesn't work like I think it should. double[] numbers1
I'd like to think I've been in this field for quite some time, but
I'd like to think it's simple but I just can't understand how to do
I like to think I'm quite knowledgeable on php, but this has baffled me.
I'd like to think this is obvious, but before I submit a bug report,
I like to think i'm not completely useless at creating MS Access databases, but
I would like to think of myself as a decent SQL Server programmer but
Think I have an integer array like this: a[0]=60; a[1]=321; a[2]=5; now I want
I'd like to know what you think about this part of our program is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.