Skip to content

Commit 4fdd8b5

Browse files
authored
DOC: point out that only period frequencies are valid for to_period (#53477)
point out that only period frequencies are valid for to_period
1 parent c339b4d commit 4fdd8b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/core/arrays/datetimes.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1139,9 +1139,9 @@ def normalize(self) -> Self:
11391139

11401140
def to_period(self, freq=None) -> PeriodArray:
11411141
"""
1142-
Cast to PeriodArray/Index at a particular frequency.
1142+
Cast to PeriodArray/PeriodIndex at a particular frequency.
11431143
1144-
Converts DatetimeArray/Index to PeriodArray/Index.
1144+
Converts DatetimeArray/Index to PeriodArray/PeriodIndex.
11451145
11461146
Parameters
11471147
----------

0 commit comments

Comments
 (0)