pyarrow.compute.day_of_week#
- pyarrow.compute.day_of_week(values, /, *, count_from_zero=True, week_start=1, options=None, memory_pool=None)#
Extract day of the week number.
By default, the week starts on Monday represented by 0 and ends on Sunday represented by 6. DayOfWeekOptions.week_start can be used to set another starting day using the ISO numbering convention (1=start week on Monday, 7=start week on Sunday). Day numbers can start at 0 or 1 based on DayOfWeekOptions.count_from_zero. Null values emit null. An error is returned if the values have a defined timezone but it cannot be found in the timezone database.
- Parameters
- valuesArray-like or scalar-like
Argument to compute function.
- count_from_zerobool, default
True
If True, number days from 0, otherwise from 1.
- week_start
int
, default 1 Which day does the week start with (Monday=1, Sunday=7). How this value is numbered is unaffected by count_from_zero.
- options
pyarrow.compute.DayOfWeekOptions
, optional Alternative way of passing options.
- memory_pool
pyarrow.MemoryPool
, optional If not passed, will allocate memory from the default memory pool.