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

Series functions with level parameter produces Series with sorted index while Pandas doesn't do this #1708

Closed
amyskov opened this issue Jul 12, 2020 · 0 comments · Fixed by #1830
Labels
bug 🦗 Something isn't working
Milestone

Comments

@amyskov
Copy link
Contributor

amyskov commented Jul 12, 2020

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 18.04
  • Modin version (modin.__version__): 0.7.3+197.g8602fc0
  • Python version: 3.8.3
  • Code we can use to reproduce:
import pandas
import numpy as np

from modin.pandas.test.utils import test_data
from modin.pandas.test.test_series import create_test_series

s_modin, s_pandas = create_test_series(test_data["dense_nan_data"])
rows_number = len(s_modin.index)
level_0 = np.random.choice([x for x in range(10)], rows_number)
level_1 = np.random.choice([x for x in range(10)], rows_number)
index = pandas.MultiIndex.from_arrays([level_0, level_1])

s_modin.index = index
s_pandas.index = index

print("s_modin.all(level=0).index", s_modin.all(level=0).index) # Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], dtype='int64')
print("s_pandas.all(level=0).index", s_pandas.all(level=0).index) # Int64Index([1, 5, 8, 2, 4, 7, 9, 3, 6, 0], dtype='int64')

print("s_modin.any(level=0).index", s_modin.any(level=0).index) #  Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], dtype='int64')
print("s_pandas.any(level=0).index", s_pandas.any(level=0).index) # Int64Index([1, 5, 8, 2, 4, 7, 9, 3, 6, 0], dtype='int64')

print("s_modin.mad(level=0).index", s_modin.mad(level=0).index) # Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], dtype='int64')
print("s_pandas.mad(level=0).index", s_pandas.mad(level=0).index) # Int64Index([1, 5, 8, 2, 4, 7, 9, 3, 6, 0], dtype='int64')

Describe the problem

Source code / logs

@amyskov amyskov added the bug 🦗 Something isn't working label Jul 12, 2020
@devin-petersohn devin-petersohn added this to the 0.8.1 milestone Jul 24, 2020
@anmyachev anmyachev modified the milestones: 0.8.1, 0.8.0 Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🦗 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants