Skip to content

Conversation

@WillAyd
Copy link
Member

@WillAyd WillAyd commented Feb 24, 2018

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")
Copy link
Contributor

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

@WillAyd WillAyd changed the title Pct change fill Fixed pct_change with 'fill_method' returning NaN instead of 0 Feb 24, 2018
@codecov
Copy link

codecov bot commented Feb 24, 2018

Codecov Report

Merging #19875 into master will decrease coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@ 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
Flag Coverage Δ
#multiple 90.02% <100%> (-0.04%) ⬇️
#single 41.81% <0%> (-0.02%) ⬇️
Impacted Files Coverage Δ
pandas/core/generic.py 95.88% <100%> (-0.05%) ⬇️
pandas/plotting/_converter.py 65.22% <0%> (-1.74%) ⬇️
pandas/core/indexes/timedeltas.py 90.63% <0%> (-0.32%) ⬇️
pandas/core/indexes/datetimelike.py 97.13% <0%> (-0.25%) ⬇️
pandas/core/indexes/period.py 92.7% <0%> (-0.17%) ⬇️
pandas/core/indexes/datetimes.py 95.47% <0%> (-0.15%) ⬇️
pandas/core/config.py 87.04% <0%> (-0.13%) ⬇️
pandas/core/frame.py 97.18% <0%> (-0.06%) ⬇️
pandas/core/apply.py 96.77% <0%> (+0.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e97be6f...d687383. Read the comment docs.

func = getattr(obj, 'pct_change')
res = func(periods=periods, fill_method=fill_method, limit=limit)

# Convert output into Series, regardless of input type
Copy link
Contributor

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 
@jreback jreback added Bug Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate labels Feb 24, 2018
@WillAyd
Copy link
Member Author

WillAyd commented Feb 25, 2018

Failed Travis tests don't appear related to the change

@jreback jreback added this to the 0.23.0 milestone Feb 25, 2018
@jreback jreback merged commit fb54f40 into pandas-dev:master Feb 25, 2018
@jreback
Copy link
Contributor

jreback commented Feb 25, 2018

thanks @WillAyd

@WillAyd WillAyd deleted the pct-change-fill branch May 14, 2018 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate

2 participants