Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K

pandas.arrays.DatetimeArray#

classpandas.arrays.DatetimeArray(values,dtype=None,freq=<no_default>,copy=False)[source]#

Pandas ExtensionArray for tz-naive or tz-aware datetime data.

Warning

DatetimeArray is currently experimental, and its API may changewithout warning. In particular,DatetimeArray.dtype isexpected to change to always be an instance of anExtensionDtypesubclass.

Parameters:
valuesSeries, Index, DatetimeArray, ndarray

The datetime data.

For DatetimeArrayvalues (or a Series or Index boxing one),dtype andfreq will be extracted fromvalues.

dtypenumpy.dtype or DatetimeTZDtype

Note that the only NumPy dtype allowed is ‘datetime64[ns]’.

freqstr or Offset, optional

The frequency.

copybool, default False

Whether to copy the underlying array of values.

Attributes

None

Methods

None

Examples

>>>pd.arrays.DatetimeArray._from_sequence(...pd.DatetimeIndex(['2023-01-01','2023-01-02'],freq='D'))<DatetimeArray>['2023-01-01 00:00:00', '2023-01-02 00:00:00']Length: 2, dtype: datetime64[ns]

[8]ページ先頭

©2009-2025 Movatter.jp