A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://pandas.pydata.org/docs/dev/user_guide/../reference/api/pandas.PeriodIndex.html below:

pandas.PeriodIndex — pandas 3.0.0.dev0+2232.ga2315af1df documentation

pandas.PeriodIndex#
class pandas.PeriodIndex(data=None, freq=None, dtype=None, copy=False, name=None)[source]#

Immutable ndarray holding ordinal values indicating regular periods in time.

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

Parameters:
dataarray-like (1d int np.ndarray or PeriodArray), optional

Optional period-like data to construct index with.

freqstr or period object, optional

One of pandas period strings or corresponding objects.

dtypestr or PeriodDtype, default None

A dtype from which to extract a freq.

copybool

Make a copy of input ndarray.

namestr, default None

Name of the resulting PeriodIndex.

Attributes

Methods

Raises:
ValueError

Passing the parameter data as a list without specifying either freq or dtype will raise a ValueError: “freq not specified and cannot be inferred”

Examples

>>> idx = pd.PeriodIndex(data=["2000Q1", "2002Q3"], freq="Q")
>>> idx
PeriodIndex(['2000Q1', '2002Q3'], dtype='period[Q-DEC]')

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4