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

Fillna df.mean() compatibility test #462

Merged
merged 1 commit into from
Dec 2, 2019

Conversation

xdssio
Copy link
Collaborator

@xdssio xdssio commented Nov 19, 2019

Desired functionality for fillna in a standard use case.

# Current implementation
df['x'] = df.x.fillna(float(df.x.mean()))

vs

# Desired functionality
df['x'] = df.x.fillna(df.x.mean())
  • implement new functionality
  • add unit-test
  • review

@maartenbreddels
Copy link
Member

Yeah, that should work indeed, I think. Will look into it.

@JovanVeljanoski JovanVeljanoski changed the title test desired functionality Fillna df.mean() compatibility test Nov 19, 2019
@maartenbreddels
Copy link
Member

This was not a specific problem with fillna/mean, but with and function added to a dataframe. I've made the test and code more general.

@maartenbreddels maartenbreddels merged commit c0ff5f6 into master Dec 2, 2019
@maartenbreddels maartenbreddels deleted the fix_fillna_float_usecase branch May 11, 2020 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants