pyarrow.compute.WeekOptions

class pyarrow.compute.WeekOptions(*, week_starts_monday=True, count_from_zero=False, first_week_is_fully_in_year=False)

Bases: pyarrow._compute._WeekOptions

Options for the week function.

Parameters
week_starts_mondaybool, default True

If True, weeks start on Monday; if False, on Sunday.

count_from_zerobool, default False

If True, dates at the start of a year that fall into the last week of the previous year emit 0. If False, they emit 52 or 53 (the week number of the last week of the previous year).

first_week_is_fully_in_yearbool, default False

If True, week number 0 is fully in January. If False, a week that begins on December 29, 30 or 31 is considered to be week number 0 of the following year.

__init__(self, *, week_starts_monday=True, count_from_zero=False, first_week_is_fully_in_year=False)

Methods

__init__(self, *[, week_starts_monday, ...])

deserialize(buf)

Deserialize options for a function.

serialize(self)

static deserialize(buf)

Deserialize options for a function.

Parameters
bufBuffer

The buffer containing the data to deserialize.

serialize(self)