polars.internals.expr.ExprDateTimeNameSpace.week

ExprDateTimeNameSpace.week() polars.internals.expr.Expr

Extract the week from the underlying Date representation. Can be performed on Date and Datetime

Returns the ISO week number starting from 1. The return value ranges from 1 to 53. (The last week of year differs by years.)

Returns
Week number as UInt32