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.loc[row][column] = value has no effect #1675

Closed
gshimansky opened this issue Jun 30, 2020 · 2 comments · Fixed by #1676
Closed

df.loc[row][column] = value has no effect #1675

gshimansky opened this issue Jun 30, 2020 · 2 comments · Fixed by #1676
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.3+165.g9721d46

  • Python version:

Python 3.8.2

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

df = pd.DataFrame(index=["a", "b", "c"], columns=["col1"])
df.loc["a"]["col1"] = 123
df.loc["b"]["col1"] = 321
df.loc["c"]["col1"] = 444
print(df)

Describe the problem

Assigning to df.loc[row][column] as no effect and dataframe contents remains all NaN.

Source code / logs

@gshimansky gshimansky added the bug 🦗 Something isn't working label Jun 30, 2020
gshimansky added a commit to gshimansky/modin that referenced this issue Jun 30, 2020
Implemented correct Series assignment to DataFrame parent depending on
which axis was used for indexing.

Signed-off-by: Gregory Shimansky <[email protected]>
@devin-petersohn
Copy link
Collaborator

Related to #1556

@gshimansky
Copy link
Collaborator Author

Yes the same problem must have happened in #1556 because loc and iloc don't initialize resulting Series._parent field.

devin-petersohn pushed a commit that referenced this issue Jul 1, 2020
Implemented correct Series assignment to DataFrame parent depending on
which axis was used for indexing.

Signed-off-by: Gregory Shimansky <[email protected]>
@gshimansky gshimansky self-assigned this Jul 1, 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.

2 participants