Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: set_index works wrong with multiindex #5186

Closed
3 tasks done
anmyachev opened this issue Nov 3, 2022 · 0 comments · Fixed by #5190
Closed
3 tasks done

BUG: set_index works wrong with multiindex #5186

anmyachev opened this issue Nov 3, 2022 · 0 comments · Fixed by #5190
Assignees
Labels
bug 🦗 Something isn't working pandas concordance 🐼 Functionality that does not match pandas

Comments

@anmyachev
Copy link
Collaborator

anmyachev commented Nov 3, 2022

Modin version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest released version of Modin.

  • I have confirmed this bug exists on the main branch of Modin. (In order to do this you can follow this guide.)

Reproducible Example

import modin.pandas as pd
import numpy as np

import pdb;pdb.set_trace()
df = pd.DataFrame(np.ones([2,4]),columns = [['a','b','c','d'],['','','x','y']])

print(df.set_index('a'))
print(df._to_pandas().set_index('a'))

Issue Description

Wrong output from the first print:

          a    b    c    d
                    x    y
(d, y)
1.0     1.0  1.0  1.0  1.0
1.0     1.0  1.0  1.0  1.0

Expected Behavior

Expected output (from the second print):

       b    c    d
            x    y
a
1.0  1.0  1.0  1.0
1.0  1.0  1.0  1.0

Error Logs

Replace this line with the error backtrace (if applicable).

Installed Versions

Replace this line with the output of pd.show_versions()

@anmyachev anmyachev added bug 🦗 Something isn't working pandas concordance 🐼 Functionality that does not match pandas labels Nov 3, 2022
@anmyachev anmyachev self-assigned this Nov 3, 2022
anmyachev added a commit to anmyachev/modin that referenced this issue Nov 9, 2022
Signed-off-by: Myachev <anatoly.myachev@intel.com>
dchigarev pushed a commit that referenced this issue Nov 14, 2022
Signed-off-by: Myachev <anatoly.myachev@intel.com>
dchigarev pushed a commit that referenced this issue Nov 25, 2022
Signed-off-by: Myachev <anatoly.myachev@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🦗 Something isn't working pandas concordance 🐼 Functionality that does not match pandas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant