Skip to content

DOC: Fixed PeriodArray api ref #25526

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 4 commits into from
Mar 20, 2019
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 doc/source/reference/arrays.rst
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ Every period in a ``PeriodArray`` must have the same ``freq``.
.. autosummary::
:toctree: api/

arrays.DatetimeArray
arrays.PeriodArray
PeriodDtype

.. _api.arrays.interval:
Expand Down
5 changes: 4 additions & 1 deletion pandas/core/arrays/period.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,16 @@ class PeriodArray(dtl.DatetimeLikeArrayMixin, dtl.DatelikeOps):
is an ndarray of integers, when `freq` is required. When `values`
is a PeriodArray (or box around), it's checked that ``values.freq``
matches `freq`.
dtype : PeriodDtype, optional
A PeriodDtype instance from which to extract a `freq`. If both
`freq` and `dtype` are specified, then the frequencies must match.
copy : bool, default False
Copy link
Contributor

Choose a reason for hiding this comment

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

so maybe a Raises section showing IncompatibleFrequecy

Whether to copy the ordinals before storing.

See Also
--------
period_array : Create a new PeriodArray.
pandas.PeriodIndex : Immutable Index for period data.
PeriodIndex : Immutable Index for period data.

Notes
-----
Expand Down