pandas 1.4.2

AttributesMethodsNotesParametersBackRef

Attributes

None :

Users should use ~pandas.period_array to create new instances. Alternatively, ~pandas.array can be used to create new instances from a sequence of Period scalars.

Methods

Notes

There are two components to a PeriodArray

Parameters

values : Union[PeriodArray, Series[period], ndarray[int], PeriodIndex]

The data to store. These should be arrays that can be directly converted to ordinals without inference or copy (PeriodArray, ndarray[int64]), or a box around such an array (Series[period], PeriodIndex).

dtype : PeriodDtype, optional

A PeriodDtype instance from which to extract a :None:None:`freq`. If both :None:None:`freq` and dtype are specified, then the frequencies must match.

freq : str or DateOffset

The :None:None:`freq` to use for the array. Mostly applicable when :None:None:`values` is an ndarray of integers, when :None:None:`freq` is required. When :None:None:`values` is a PeriodArray (or box around), it's checked that values.freq matches :None:None:`freq`.

copy : bool, default False

Whether to copy the ordinals before storing.

Pandas ExtensionArray for storing Period data.

See Also

Period

Represents a period of time.

PeriodIndex

Immutable Index for period data.

array

Construct a pandas array.

period_range

Create a fixed-frequency PeriodArray.

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

pandas.core.arrays.period.period_array

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /pandas/core/arrays/period.py#107
type: <class 'type'>
Commit: