We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9208a35 commit 97b832bCopy full SHA for 97b832b
pandas/core/generic.py
@@ -10257,10 +10257,10 @@ def pct_change(
10257
GOOG 1769950 1500923 1371819
10258
APPL 30586265 40912316 41403351
10259
10260
- >>> df.pct_change(axis='columns')
10261
- 2016 2015 2014
10262
- GOOG NaN -0.151997 -0.086016
10263
- APPL NaN 0.337604 0.012002
+ >>> df.pct_change(axis='columns', periods=-1)
+ 2016 2015 2014
+ GOOG 0.179241 0.094112 NaN
+ APPL -0.252395 -0.011860 NaN
10264
"""
10265
axis = self._get_axis_number(kwargs.pop("axis", self._stat_axis_name))
10266
if fill_method is None:
0 commit comments