Skip to content

Commit

Permalink
update dedeprecation message for np.ptp DEPR pandas-dev#28665 pandas-…
Browse files Browse the repository at this point in the history
  • Loading branch information
hasnain2808 committed Dec 22, 2019
1 parent 04fce81 commit da3c79a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -10198,7 +10198,10 @@ def nanptp(values, axis=0, skipna=True):
nmin = nanops.nanmin(values, axis, skipna)
warnings.warn(
"Method .ptp is deprecated and will be removed "
"in a future version. Use numpy.ptp instead.",
"in a future version. Use numpy.ptp instead."
"if you are already using numpy.ptp and still getting this message"
"please call to_numpy() to avoid this message in future calls"
"eg : np.ptp(pd.Series([1, 2, 3]).to_numpy())",
FutureWarning,
stacklevel=4,
)
Expand Down

0 comments on commit da3c79a

Please sign in to comment.