Skip to content

DOC: pd.Period and pd.period_range should document that they accept datetime, date and pd.Timestamp #53611

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

Merged
merged 2 commits into from
Jun 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion pandas/_libs/tslibs/period.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2656,7 +2656,7 @@ class Period(_Period):

Parameters
----------
value : Period or str, default None
value : Period, str, datetime, date or pandas.Timestamp, default None
The time period represented (e.g., '4Q2005'). This represents neither
the start or the end of the period, but rather the entire period itself.
freq : str, default None
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/indexes/period.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ def period_range(

Parameters
----------
start : str or period-like, default None
start : str, datetime, date, pandas.Timestamp, or period-like, default None
Left bound for generating periods.
end : str or period-like, default None
Right bound for generating periods.
Expand Down