modin.pandas.DatetimeIndex

class modin.pandas.DatetimeIndex(data: ArrayLike | native_pd.Index | pd.Series | None = None, freq: Frequency | lib.NoDefault = _NoDefault.no_default, tz=_NoDefault.no_default, normalize: bool | lib.NoDefault = _NoDefault.no_default, closed=_NoDefault.no_default, ambiguous: TimeAmbiguous = 'raise', dayfirst: bool = False, yearfirst: bool = False, dtype: Dtype | None = None, copy: bool = False, name: Hashable | None = None, query_compiler: SnowflakeQueryCompiler = None)[source]

Bases: Index

Methods

as_unit(unit)

Convert to a dtype with the given unit resolution.

ceil(freq[, ambiguous, nonexistent])

Perform ceil operation on the data to the specified freq.

day_name([locale])

Return the day names with specified locale.

floor(freq[, ambiguous, nonexistent])

Perform floor operation on the data to the specified freq.

indexer_at_time(time[, asof])

Return index locations of values at particular time of day.

indexer_between_time(start_time, end_time[, ...])

Return index locations of values between particular times of day.

mean(*[, skipna, axis])

Return the mean value of the Array.

month_name([locale])

Return the month names with specified locale.

normalize()

Convert times to midnight.

round(freq[, ambiguous, nonexistent])

Perform round operation on the data to the specified freq.

snap([freq])

Snap time stamps to nearest occurring frequency.

std([axis, ddof, skipna])

Return sample standard deviation over requested axis.

strftime(date_format)

Convert to Index using specified date_format.

to_period([freq])

Cast to PeriodArray/PeriodIndex at a particular frequency.

to_pydatetime()

Return a ndarray of datetime.datetime objects.

tz_convert(tz)

Convert tz-aware Datetime Array/Index from one time zone to another.

tz_localize(tz[, ambiguous, nonexistent])

Localize tz-naive Datetime Array/Index to tz-aware Datetime Array/Index.

Attributes

date

Returns the date part of Timestamps without time and timezone information.

day

The day of the datetime.

day_of_week

The day of the week with Monday=0, Sunday=6.

day_of_year

The ordinal day of the year.

dayofweek

The day of the week with Monday=0, Sunday=6.

dayofyear

The ordinal day of the year.

freq

Return the frequency object if it's set, otherwise None.

freqstr

Return the frequency object as a string if it's set, otherwise None.

hour

The hours of the datetime.

inferred_freq

Tries to return a string representing a frequency generated by infer_freq.

is_leap_year

Boolean indicator if the date belongs to a leap year.

is_month_end

Indicates whether the date is the last day of the month.

is_month_start

Indicates whether the date is the first day of the month.

is_quarter_end

Indicator for whether the date is the last day of a quarter.

is_quarter_start

Indicator for whether the date is the first day of a quarter.

is_year_end

Indicate whether the date is the last day of the year.

is_year_start

Indicate whether the date is the first day of a year.

microsecond

The microseconds of the datetime.

minute

The minutes of the datetime.

month

The month as January=1, December=12.

nanosecond

The nanoseconds of the datetime.

quarter

The quarter of the date.

second

The seconds of the datetime.

time

Returns the time part of the Timestamps.

timetz

Returns the time part of the Timestamps with timezone.

tz

Return the timezone.

weekday

The day of the week with Monday=0, Sunday=6.

year

The year of the datetime.