Class DatetimeIndex (2.15.0)

DatetimeIndex(data=None, dtype=None, *, name=None, session=None)

Immutable sequence used for indexing and alignment with datetime-like values

Properties

day

The day of the datetime.

Examples:

>>> import bigframes.pandas as bpd
>>> import pandas as pd
>>> bpd.options.display.progress_bar = None
>>> idx = bpd.Index([pd.Timestamp("20250215")])
>>> idx.day
Index([15], dtype='Int64')

day_of_week

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

Examples:

>>> import bigframes.pandas as bpd
>>> import pandas as pd
>>> bpd.options.display.progress_bar = None
>>> idx = bpd.Index([pd.Timestamp("20250215")])
>>> idx.day_of_week
Index([5], dtype='Int64')

dayofweek

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

Examples:

>>> import bigframes.pandas as bpd
>>> import pandas as pd
>>> bpd.options.display.progress_bar = None
>>> idx = bpd.Index([pd.Timestamp("20250215")])
>>> idx.dayofweek
Index([5], dtype='Int64')

month

The month as January=1, December=12.

Examples:

>>> import bigframes.pandas as bpd
>>> import pandas as pd
>>> bpd.options.display.progress_bar = None
>>> idx = bpd.Index([pd.Timestamp("20250215")])
>>> idx.month
Index([2], dtype='Int64')

weekday

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

Examples:

>>> import bigframes.pandas as bpd
>>> import pandas as pd
>>> bpd.options.display.progress_bar = None
>>> idx = bpd.Index([pd.Timestamp("20250215")])
>>> idx.weekday
Index([5], dtype='Int64')

year

The year of the datetime

Examples:

>>> import bigframes.pandas as bpd
>>> import pandas as pd
>>> bpd.options.display.progress_bar = None
>>> idx = bpd.Index([pd.Timestamp("20250215")])
>>> idx.year
Index([2025], dtype='Int64')

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.