-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
CLN: move routines for filling missing data from core/common.py to core/missing.py #11462
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
@@ -25,6 +25,8 @@ | |||
from pandas.core.categorical import Categorical, maybe_to_categorical | |||
from pandas.tseries.index import DatetimeIndex | |||
import pandas.core.common as com | |||
from pandas.core.missing import (interpolate_1d, interpolate_2d, | |||
_clean_fill_method, _clean_interp_method) |
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.
you can also so like we do for com
, e.g. just import missing
(and then access it), might be slightly cleaner
@@ -1420,350 +1420,6 @@ def _fill_zeros(result, x, y, name, fill): | |||
return result | |||
|
|||
|
|||
def _interp_wrapper(f, wrap_dtype, na_override=None): |
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.
you might be able to strip some imports here, you might need a linter to find these though
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.
ran it through PyLint and didn't find any unused imports
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.
ok gr8
3f109ab
to
c9b0111
Compare
ok looks good |
For internals.py and generic.py I switched to the |
CLN: move routines for filling missing data from core/common.py to core/missing.py
@stahlous thanks! this was great! let's revisit the naming scheme for these in your other PR. |
This PR moves the routines used for filling missing data into their own module as suggested in PR #11445.
Thoughts on re-naming
interpolate_1d()
andinterpolate_2d()
? They way they are currently named makes them sound like they're the same functions for arrays of differing dimensions. However,interpolate_1d()
is used for interpolating with scipy interp methods whereasinterpolate_2d()
is used for forward- or back-filling.