Skip to content

BUG: df.fillna ignores axis when df is single block #47714

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

Merged
merged 7 commits into from
Jul 14, 2022

Conversation

GYHHAHA
Copy link
Contributor

@GYHHAHA GYHHAHA commented Jul 14, 2022

@pep8speaks
Copy link

pep8speaks commented Jul 14, 2022

Hello @GYHHAHA! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2022-07-14 04:27:41 UTC

@@ -6679,7 +6679,7 @@ def fillna(
return result if not inplace else None

elif not is_list_like(value):
if not self._mgr.is_single_block and axis == 1:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jbrockmendel should this be fixed in the block manager fillna?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also my question. Originally, I thought delete single block check would fail some tests but it was not. Thus get confused why we need this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be fixed in the block manager fillna?

i dont think so, the BlockManager method doesn't have an axis keyword

@mroeschke mroeschke added the Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate label Jul 14, 2022
@mroeschke mroeschke added this to the 1.5 milestone Jul 14, 2022
@mroeschke mroeschke merged commit 0a8b45f into pandas-dev:main Jul 14, 2022
@mroeschke
Copy link
Member

Thanks @GYHHAHA

@GYHHAHA GYHHAHA deleted the patch-2 branch July 14, 2022 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Fillna limit with axis=1
4 participants