bigframes.geopandas.GeoSeries.dt#

property GeoSeries.dt: DatetimeMethods#

Accessor object for datetime-like properties of the Series values.

Examples:

>>> import bigframes.pandas as bpd
>>> seconds_series = bpd.Series(pd.date_range("2000-01-01", periods=3, freq="s"))
>>> seconds_series
0    2000-01-01 00:00:00
1    2000-01-01 00:00:01
2    2000-01-01 00:00:02
dtype: timestamp[us][pyarrow]
>>> seconds_series.dt.second
0    0
1    1
2    2
dtype: Int64
>>> hours_series = bpd.Series(pd.date_range("2000-01-01", periods=3, freq="h"))
>>> hours_series
0    2000-01-01 00:00:00
1    2000-01-01 01:00:00
2    2000-01-01 02:00:00
dtype: timestamp[us][pyarrow]
>>> hours_series.dt.hour
0    0
1    1
2    2
dtype: Int64
>>> quarters_series = bpd.Series(pd.date_range("2000-01-01", periods=3, freq="QE"))
>>> quarters_series
0    2000-03-31 00:00:00
1    2000-06-30 00:00:00
2    2000-09-30 00:00:00
dtype: timestamp[us][pyarrow]
>>> quarters_series.dt.quarter
0    1
1    2
2    3
dtype: Int64
Returns:

An accessor containing datetime methods.

Return type:

bigframes.operations.datetimes.DatetimeMethods