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') 
Design a Mobile Site
View Site in Mobile | Classic
Share by: