-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: improve fillna() doc for limit keyword (fixes #10002) #10009
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
Conversation
Maximum size gap to forward or backward fill (not implemented yet!) | ||
If method is specified, this is the maximum size gap to forward or backward | ||
fill. Otherwise this is the maximum number of entries along the axis where | ||
holes will be filled. (not implemented yet!) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe put the not implemented yet first? (and maybe also explicitely "for Categorical")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea, will update
Actually, in the way I interpret "maximum size gap to forward or backward fill", this is not fully correct. I interpret it as "only fill that gap if the gap is not larger as 'limit'", but it is "per gap, fill a maximum numbers of 'limit'":
|
What if we rephrase it to say something like: "maximum number of consecutive holes to forward or backward fill" |
lgtm |
It is a bit subjective, but I would personally still interpret that not fully correct (I see a hole as possibly multiple NaN values if they are consecutive, but maybe this is not correct language?). I think an example in the docstring to show this behaviour would possibly be the most clarifying. |
Ah yeah I suppose you could interpret a "hole" as multiple NaNs. @jorisvandenbossche please see the updated changes in the diff, I wonder if it's now clear to you. |
NaN values to forward/backward fill. In other words, if there is | ||
a gap with more than this number of consecutive NaNs, it will only | ||
be partially filled. If method is not specified, this is the | ||
maximum number of entries along the axis where NaNs will be filled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one small nitpick: maybe "along the entire axis"
For the rest everything clear now! Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure definitely more clear now, thanks!
DOC: improve fillna() doc for limit keyword (fixes #10002)
Thanks! |
fixes #10002