-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
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
Fixed pct_change with 'fill_method' returning NaN instead of 0 #19875
Conversation
pandas/tests/generic/test_generic.py
Outdated
def test_pct_change(self, periods, fill_method, limit, exp): | ||
obj = self._construct(0) | ||
if type(obj) is Panel: | ||
pytest.skip("Not testing deprecated Panel") |
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.
just add this method to the Panel section and it will skip automatically
9320540
to
69624f3
Compare
Codecov Report
@@ Coverage Diff @@
## master #19875 +/- ##
==========================================
- Coverage 91.68% 91.64% -0.04%
==========================================
Files 150 150
Lines 48915 48946 +31
==========================================
+ Hits 44847 44856 +9
- Misses 4068 4090 +22
Continue to review full report at Codecov.
|
pandas/tests/generic/test_generic.py
Outdated
func = getattr(obj, 'pct_change') | ||
res = func(periods=periods, fill_method=fill_method, limit=limit) | ||
|
||
# Convert output into Series, regardless of input type |
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.
if you rename obj above, you can simply determine the output down here, and make this a bit less convoluted, e.g.
if type(obj) is DataFrame:
# compare dataframe
else:
# compare series
2bd760a
to
d687383
Compare
Failed Travis tests don't appear related to the change |
thanks @WillAyd |
git diff upstream/master -u -- "*.py" | flake8 --diff