pandas 1.4.2

AttributesMethodsParametersBackRef

Attributes

day :
dayofweek :
day_of_week :
dayofyear :
day_of_year :
days_in_month :
daysinmonth :
end_time :
freq :
freqstr :
hour :
is_leap_year :
minute :
month :
quarter :
qyear :
second :
start_time :
week :
weekday :
weekofyear :
year :

Index keys are boxed to Period objects which carries the metadata (eg, frequency information).

Methods

Parameters

data : array-like (1d int np.ndarray or PeriodArray), optional

Optional period-like data to construct index with.

copy : bool

Make a copy of input ndarray.

freq : str or period object, optional

One of pandas period strings or corresponding objects.

year : int, array, or Series, default None
month : int, array, or Series, default None
quarter : int, array, or Series, default None
day : int, array, or Series, default None
hour : int, array, or Series, default None
minute : int, array, or Series, default None
second : int, array, or Series, default None
dtype : str or PeriodDtype, default None

Immutable ndarray holding ordinal values indicating regular periods in time.

See Also

DatetimeIndex

Index with datetime64 data.

Index

The base pandas Index type.

Period

Represents a period of time.

TimedeltaIndex

Index of timedelta64 data.

period_range

Create a fixed-frequency PeriodIndex.

Examples

This example is valid syntax, but we were not able to check execution
>>> idx = pd.PeriodIndex(year=[2000, 2002], quarter=[1, 3])
... idx PeriodIndex(['2000Q1', '2002Q3'], dtype='period[Q-DEC]')
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 pandas.core.frame.DataFrame.resample pandas.core.arrays.datetimes.DatetimeArray.to_period pandas.core.indexes.timedeltas.TimedeltaIndex pandas.core.indexes.datetimes.DatetimeIndex pandas.core.series.Series.resample pandas.core.indexes.base.Index pandas.core.generic.NDFrame.resample pandas.core.arrays.period.PeriodArray

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/indexes/period.py#75
type: <class 'type'>
Commit: