Skip to content

Commit c5bf3d3

Browse files
authored
DOC: add section Raises to PeriodIndex docstring (#57461)
add section raises to PeriodIndex docstring
1 parent aa6ab37 commit c5bf3d3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pandas/core/indexes/period.py

+6
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,12 @@ class PeriodIndex(DatetimeIndexOpsMixin):
134134
from_fields
135135
from_ordinals
136136
137+
Raises
138+
------
139+
ValueError
140+
Passing the parameter data as a list without specifying either freq or
141+
dtype will raise a ValueError: "freq not specified and cannot be inferred"
142+
137143
See Also
138144
--------
139145
Index : The base pandas Index type.

0 commit comments

Comments
 (0)