Skip to content

Commit 61ae3ca

Browse files
DOC: fix docstring for pct_change (#53335)
* DOC: fix docstring for .pct_change * DOC: fix docstring for .pct_change * DOC: change to comply with black code formatter
1 parent dd11d47 commit 61ae3ca

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

pandas/core/generic.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11133,12 +11133,19 @@ def pct_change(
1113311133
**kwargs,
1113411134
) -> Self:
1113511135
"""
11136-
Percentage change between the current and a prior element.
11136+
Fractional change between the current and a prior element.
1113711137
11138-
Computes the percentage change from the immediately previous row by
11139-
default. This is useful in comparing the percentage of change in a time
11138+
Computes the fractional change from the immediately previous row by
11139+
default. This is useful in comparing the fraction of change in a time
1114011140
series of elements.
1114111141
11142+
.. note::
11143+
11144+
Despite the name of this method, it calculates fractional change
11145+
(also known as per unit change or relative change) and not
11146+
percentage change. If you need the percentage change, multiply
11147+
these values by 100.
11148+
1114211149
Parameters
1114311150
----------
1114411151
periods : int, default 1

0 commit comments

Comments
 (0)