index changed after merge
See original GitHub issueleft_kdf = ks.DataFrame({'A': [1, 2]}, index = ['zero', 'one'])
left_kdf
A
zero 1
one 2
right_kdf = ks.DataFrame({'B': ['x', 'y']}, index=['one', 'two'])
right_kdf
B
one x
two y
left_kdf.merge(right_kdf, left_index=True, right_index=True)
A B
0 2 x
Index is changed. Expected answer is
left_kdf.merge(right_kdf, left_index=True, right_index=True)
A B
one 2 x
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
How to keep index when using pandas merge - Stack Overflow
I would like to merge two DataFrames , and keep the index from the first frame as the index on the merged dataset....
Read more >pandas.merge — pandas 1.5.2 documentation
The join is done on columns or indexes. If joining columns on columns, the DataFrame indexes will be ignored. Otherwise if joining indexes...
Read more >How to keep index when using pandas merge?
We want to set the index after merging according to our wish. For this purpose, we will reset the index at the time...
Read more >Pandas: Merge - Datacomy
How to Keep index when using Pandas Merge ... By default, Pandas merge creates a new integer index for the merged DataFrame. If...
Read more >Pandas Merge DataFrames on Index - Spark by {Examples}
In this article, I will explain how to merge two pandas DataFrames by index using merge() , concat() and join() methods with examples....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello floscha. If you fix this, i can add some simple function like
join
,reindex
based onmerge
easily.There was another corner case I was missing but it should be working now.