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

df.set_index("inexistent_col") sets the index instead of raising an exception #4308

Closed
YarShev opened this issue Mar 10, 2022 · 0 comments · Fixed by #4309
Closed

df.set_index("inexistent_col") sets the index instead of raising an exception #4308

YarShev opened this issue Mar 10, 2022 · 0 comments · Fixed by #4309
Assignees
Labels
Backport 🔙 Issues that need to be backported to previous release(s)

Comments

@YarShev
Copy link
Collaborator

YarShev commented Mar 10, 2022

Modin

import modin.pandas as pd

df = pd.DataFrame({'month': [1, 4, 7, 10],
    'year': [2012, 2014, 2013, 2014],
    'sale': [55, 40, 84, 31]})

df.set_index("inexistent_col")
      month  year  sale
sale
55        1  2012    55
40        4  2014    40
84        7  2013    84
31       10  2014    31

pandas

import pandas

df = pandas.DataFrame({'month': [1, 4, 7, 10],
    'year': [2012, 2014, 2013, 2014],
    'sale': [55, 40, 84, 31]})

df.set_index("inexistent_col")
KeyError: "None of ['inexistent_col'] are in the columns"
@YarShev YarShev self-assigned this Mar 10, 2022
YarShev added a commit to YarShev/modin that referenced this issue Mar 10, 2022
Signed-off-by: Igoshev, Yaroslav <yaroslav.igoshev@intel.com>
@vnlitvinov vnlitvinov added the Backport 🔙 Issues that need to be backported to previous release(s) label Mar 10, 2022
vnlitvinov pushed a commit that referenced this issue Mar 10, 2022
Signed-off-by: Igoshev, Yaroslav <yaroslav.igoshev@intel.com>
vnlitvinov pushed a commit that referenced this issue Mar 17, 2022
Signed-off-by: Igoshev, Yaroslav <yaroslav.igoshev@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport 🔙 Issues that need to be backported to previous release(s)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants