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.Period.html below:

pandas.Period — pandas 3.0.0.dev0+2231.g4f2aa4d2be documentation

pandas.Period#
class pandas.Period(value=None, freq=None, ordinal=None, year=None, month=None, quarter=None, day=None, hour=None, minute=None, second=None)[source]#

Represents a period of time.

A Period represents a specific time span rather than a point in time. Unlike Timestamp, which represents a single instant, a Period defines a duration, such as a month, quarter, or year. The exact representation is determined by the freq parameter.

Parameters:
valuePeriod, str, datetime, date or pandas.Timestamp, default None

The time period represented (e.g., ‘4Q2005’). This represents neither the start or the end of the period, but rather the entire period itself.

freqstr, default None

One of pandas period strings or corresponding objects. Accepted strings are listed in the period alias section in the user docs. If value is datetime, freq is required.

ordinalint, default None

The period offset from the proleptic Gregorian epoch.

yearint, default None

Year value of the period.

monthint, default 1

Month value of the period.

quarterint, default None

Quarter value of the period.

dayint, default 1

Day value of the period.

hourint, default 0

Hour value of the period.

minuteint, default 0

Minute value of the period.

secondint, default 0

Second value of the period.

See also

Timestamp

Pandas replacement for python datetime.datetime object.

date_range

Return a fixed frequency DatetimeIndex.

timedelta_range

Generates a fixed frequency range of timedeltas.

Examples

>>> period = pd.Period('2012-1-1', freq='D')
>>> period
Period('2012-01-01', 'D')

Attributes

Methods


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