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

sort_values inplace=True clears dataframe contents #1743

Closed
gshimansky opened this issue Jul 16, 2020 · 1 comment
Closed

sort_values inplace=True clears dataframe contents #1743

gshimansky opened this issue Jul 16, 2020 · 1 comment
Assignees
Labels
bug 🦗 Something isn't working

Comments

@gshimansky
Copy link
Collaborator

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04):

Ubuntu 20.04

  • Modin version (modin.__version__):

0.7.4+28.g7c94902

  • Python version:

Python 3.8.2

  • Code we can use to reproduce:
import modin.pandas as pd

df = pd.DataFrame({"col": [2, 51, 17],}, index=["abc", "def", "ghi"])
print(df)
print(df.index)
df.sort_values(by=["col"], inplace=True)
print(df)

Describe the problem

This code when ran on Modin produces a dataframe with NaN contents instead of sorted values.

Source code / logs

@gshimansky gshimansky added the bug 🦗 Something isn't working label Jul 16, 2020
@gshimansky gshimansky self-assigned this Jul 16, 2020
gshimansky added a commit to gshimansky/modin that referenced this issue Jul 17, 2020
Signed-off-by: Gregory Shimansky <gregory.shimansky@intel.com>
gshimansky added a commit to devin-petersohn/modin that referenced this issue Jul 20, 2020
This test runs inplace sort of dataframe that has non-numerical index

Signed-off-by: Gregory Shimansky <gregory.shimansky@intel.com>
anmyachev added a commit that referenced this issue Jul 21, 2020
* Move logic of `sort_values` into the query compiler

Signed-off-by: Devin Petersohn <devin.petersohn@gmail.com>

* Remove dead code

Signed-off-by: Devin Petersohn <devin.petersohn@gmail.com>

* Add back `"kind"` parameter

Signed-off-by: Devin Petersohn <devin.petersohn@gmail.com>

* Added a test for bug #1743

This test runs inplace sort of dataframe that has non-numerical index

Signed-off-by: Gregory Shimansky <gregory.shimansky@intel.com>

* Apply suggestions from code review

Co-authored-by: anmyachev <45976948+anmyachev@users.noreply.github.com>

Co-authored-by: Gregory Shimansky <gregory.shimansky@intel.com>
Co-authored-by: anmyachev <45976948+anmyachev@users.noreply.github.com>
@gshimansky
Copy link
Collaborator Author

Fixed as a part of #1754

aregm pushed a commit to aregm/modin that referenced this issue Sep 16, 2020
* Move logic of `sort_values` into the query compiler

Signed-off-by: Devin Petersohn <devin.petersohn@gmail.com>

* Remove dead code

Signed-off-by: Devin Petersohn <devin.petersohn@gmail.com>

* Add back `"kind"` parameter

Signed-off-by: Devin Petersohn <devin.petersohn@gmail.com>

* Added a test for bug modin-project#1743

This test runs inplace sort of dataframe that has non-numerical index

Signed-off-by: Gregory Shimansky <gregory.shimansky@intel.com>

* Apply suggestions from code review

Co-authored-by: anmyachev <45976948+anmyachev@users.noreply.github.com>

Co-authored-by: Gregory Shimansky <gregory.shimansky@intel.com>
Co-authored-by: anmyachev <45976948+anmyachev@users.noreply.github.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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant