Skip to content

Commit a5458ad

Browse files
natmokvalpmhatre1
authored andcommitted
DOC: add section Raises to PeriodIndex docstring (pandas-dev#57461)
add section raises to PeriodIndex docstring
1 parent 6a6e4f8 commit a5458ad

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)