-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TYP overload fillna #40737
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
Comments
This issue would unblock some of the typing difficulties in #38594 |
take |
@MarcoGorelli Hi! I'm a first-time contributor, and this is my first attempt at an issue. So forgive me if this takes a few days to do while I get used to this codebase and to the rules associated with this project. Thanks! |
Hi @MarcoGorelli. After reading #40197 and the pandas documentation, I am under the impression that I would need to add overloads to the following files: |
Hi @LarWong - yup, that's right! This one's a bit more complicated, as there's some extra arguments, but please do ping me if you get stuck |
@MarcoGorelli Will do! |
@AlPalll I am still working on this. |
@MarcoGorelli Hi. I'm getting a redundant cast error after adding overloads to
and this the part of the code that the warning refers to:
I am new to Python typing, so I am a bit confused on how to resolve this. Thanks |
It seems like the following overload caused the error above:
Adding
However, this defeats the purpose of the overload signature. |
Hi @LarWong , Now that |
@MarcoGorelli Hi, I removed the cast lines, and the errors have been resolved. Thanks! |
* TYP: Added overloads for fillna() in frame.py and series.py * TYP: Added overloads for fillna() in frame.py and series.py #40737 * TYP: Added fillna() overloads to generic.py #40727 * TYP: removed generic overloads #40737 * fixed redundant cast error * reverting prior changes * remove cast again * removed unnecessary overloads in frame.py and series.py * fixed overloads * reverted value typing * remove extra types (lets keep this to overloads) Co-authored-by: Marco Gorelli <[email protected]>
* TYP: Added overloads for fillna() in frame.py and series.py * TYP: Added overloads for fillna() in frame.py and series.py pandas-dev#40737 * TYP: Added fillna() overloads to generic.py pandas-dev#40727 * TYP: removed generic overloads pandas-dev#40737 * fixed redundant cast error * reverting prior changes * remove cast again * removed unnecessary overloads in frame.py and series.py * fixed overloads * reverted value typing * remove extra types (lets keep this to overloads) Co-authored-by: Marco Gorelli <[email protected]>
* TYP: Added overloads for fillna() in frame.py and series.py * TYP: Added overloads for fillna() in frame.py and series.py pandas-dev#40737 * TYP: Added fillna() overloads to generic.py pandas-dev#40727 * TYP: removed generic overloads pandas-dev#40737 * fixed redundant cast error * reverting prior changes * remove cast again * removed unnecessary overloads in frame.py and series.py * fixed overloads * reverted value typing * remove extra types (lets keep this to overloads) Co-authored-by: Marco Gorelli <[email protected]>
* TYP: Added overloads for fillna() in frame.py and series.py * TYP: Added overloads for fillna() in frame.py and series.py pandas-dev#40737 * TYP: Added fillna() overloads to generic.py pandas-dev#40727 * TYP: removed generic overloads pandas-dev#40737 * fixed redundant cast error * reverting prior changes * remove cast again * removed unnecessary overloads in frame.py and series.py * fixed overloads * reverted value typing * remove extra types (lets keep this to overloads) Co-authored-by: Marco Gorelli <[email protected]>
fillna
has a different return type according to whetherinplace
isTrue
orFalse
. We could overload it to provide a better typing experienceSee #40197 for a very similar issue
Task here is:
fillna
fillna
instead ofreset_index
- some of the other arguments probably need changing too)output:
I've marked this as 'good first issue' as it doesn't require any knowledge of the pandas core codebase, though it's probably not the easiest if you're not at least somewhat familiar with mypy / typing
The text was updated successfully, but these errors were encountered: