class_docstr: Date/Time methods for pandas-on-Spark Series
class_docstr_tok: ["Date\/Time","methods","for","pandas-on-Spark","Series"]
docstr: The day of the week with Monday=0, Sunday=6.
  
  Return the day of the week. It is assumed the week starts on
  Monday, which is denoted by 0 and ends on Sunday which is denoted
  by 6. This method is available on both Series with datetime
  values (using the `dt` accessor).
  
  Returns
  -------
  Series
      Containing integers indicating the day number.
  
  See Also
  --------
  Series.dt.dayofweek : Alias.
  Series.dt.weekday : Alias.
  Series.dt.day_name : Returns the name of the day of the week.
  
  Examples
  --------
  >>> s = ps.from_pandas(pd.date_range('2016-12-31', '2017-01-08', freq='D').to_series())
  >>> s.dt.dayofweek
  2016-12-31    5
  2017-01-01    6
  2017-01-02    0
  2017-01-03    1
  2017-01-04    2
  2017-01-05    3
  2017-01-06    4
  2017-01-07    5
  2017-01-08    6
  dtype: int32
docstr_tok: ["The","day","of","the","week","with","Monday=0",",","Sunday=6",".","Return","the","day","of","the","week",".","It","is","assumed","the","week","starts","on","Monday",",","which","is","denoted","by","0","and","ends","on","Sunday","which","is","denoted","by","6",".","This","method","is","available","on","both","Series","with","datetime","values","(","using","the","`","dt","`","accessor",")",".","Returns","--","--","--","-","Series","Containing","integers","indicating","the","day","number",".","See","Also","--","--","--","--","Series.dt.dayofweek",":","Alias",".","Series.dt.weekday",":","Alias",".","Series.dt.day_name",":","Returns","the","name","of","the","day","of","the","week",".","Examples","--","--","--","--",">",">",">","s","=","ps.from_pandas","(","pd.date_range","(","'2016-12-31","'",",","'2017-01-08","'",",","freq='D","'",")",".to_series","(",")",")",">",">",">","s.dt.dayofweek","2016-12-31","5","2017-01-01","6","2017-01-02","0","2017-01-03","1","2017-01-04","2","2017-01-05","3","2017-01-06","4","2017-01-07","5","2017-01-08","6","dtype",":","int32"]
code: def dayofweek(self) -> "ps.Series":
      """
      The day of the week with Monday=0, Sunday=6.
  
      Return the day of the week. It is assumed the week starts on
      Monday, which is denoted by 0 and ends on Sunday which is denoted
      by 6. This method is available on both Series with datetime
      values (using the `dt` accessor).
  
      Returns
      -------
      Series
          Containing integers indicating the day number.
  
      See Also
      --------
      Series.dt.dayofweek : Alias.
      Series.dt.weekday : Alias.
      Series.dt.day_name : Returns the name of the day of the week.
  
      Examples
      --------
      >>> s = ps.from_pandas(pd.date_range('2016-12-31', '2017-01-08', freq='D').to_series())
      >>> s.dt.dayofweek
      2016-12-31    5
      2017-01-01    6
      2017-01-02    0
      2017-01-03    1
      2017-01-04    2
      2017-01-05    3
      2017-01-06    4
      2017-01-07    5
      2017-01-08    6
      dtype: int32
      """
  
      def pandas_dayofweek(s) -> ps.Series[np.int32]:  # type: ignore[no-untyped-def]
          return s.dt.dayofweek
  
      return self._data.pandas_on_spark.transform_batch(
          pandas_dayofweek
      )
  
imports: from typing import Any, Optional, Union, no_type_check
  import numpy
  import pandas
  from pandas.tseries.offsets import DateOffset
  import pyspark.pandas
  import pyspark.sql.functions
  from pyspark.sql.types import DateType, TimestampType, TimestampNTZType, IntegerType
  from pyspark.pandas import DataFrame
  from pyspark.pandas.config import option_context
label_desc: Use image node_id 14 for calling the DatetimeMethods obj's underlying member method code with example usage: obj.dayofweek() and returns: self, s