Skip to content

DEPR update dedeprecation message for np.ptp #28665 #6581 #30401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"if you are already using numpy.ptp and still getting this message"
"if you are already using numpy.ptp and still getting this message, "

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

"please call to_numpy() to avoid this message in future calls"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"please call to_numpy() to avoid this message in future calls"
"please call to_numpy() to avoid this message in future calls. "

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

"eg : np.ptp(pd.Series([1, 2, 3]).to_numpy())",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"eg : np.ptp(pd.Series([1, 2, 3]).to_numpy())",
"For example: np.ptp(pd.Series([1, 2, 3]).to_numpy())",

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

FutureWarning,
stacklevel=4,
)
Expand Down