Skip to content

Commit da3c79a

Browse files
committed
update dedeprecation message for np.ptp DEPR pandas-dev#28665 pandas-dev#6581
1 parent 04fce81 commit da3c79a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pandas/core/generic.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10198,7 +10198,10 @@ def nanptp(values, axis=0, skipna=True):
1019810198
nmin = nanops.nanmin(values, axis, skipna)
1019910199
warnings.warn(
1020010200
"Method .ptp is deprecated and will be removed "
10201-
"in a future version. Use numpy.ptp instead.",
10201+
"in a future version. Use numpy.ptp instead."
10202+
"if you are already using numpy.ptp and still getting this message"
10203+
"please call to_numpy() to avoid this message in future calls"
10204+
"eg : np.ptp(pd.Series([1, 2, 3]).to_numpy())",
1020210205
FutureWarning,
1020310206
stacklevel=4,
1020410207
)

0 commit comments

Comments
 (0)