-
Notifications
You must be signed in to change notification settings - Fork 651
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
FIX-#4354: Fix df.loc with tuple argument on multiindex dataframe #4421
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4421 +/- ##
===========================================
- Coverage 86.39% 57.87% -28.52%
===========================================
Files 228 228
Lines 18367 18371 +4
===========================================
- Hits 15868 10633 -5235
- Misses 2499 7738 +5239
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
Doesn't this solution only work if we have 2 levels? Multiindexes can have more than 2 levels, so the solution might need a for loop to iterate over elements of the tuple. |
This also fails the case where we try and import modin.pandas as pd
import numpy as np
arrays = [
np.array(["bar", "bar", "baz", "baz", "foo", "foo", "qux", "qux"]),
np.array(["one", "two", "one", "two", "one", "two", "one", "two"]),
]
df = pd.DataFrame(np.random.randn(8, 4), index=arrays)
df.loc['bar', 0] gives us an error that it can't find key one -0.681044
two 1.607220
Name: 0, dtype: float64 |
Signed-off-by: Naren Krishna <[email protected]>
Signed-off-by: Naren Krishna <[email protected]>
Signed-off-by: Naren Krishna <[email protected]>
Signed-off-by: Naren Krishna <[email protected]>
Signed-off-by: Naren Krishna <[email protected]>
Signed-off-by: Naren Krishna <[email protected]>
Signed-off-by: Naren Krishna [email protected]
What do these changes do?
Fix df.loc with tuple argument on multi-index dataframe.
flake8 modin/ asv_bench/benchmarks scripts/doc_checker.py
black --check modin/ asv_bench/benchmarks scripts/doc_checker.py
git commit -s
docs/development/architecture.rst
is up-to-date