Ivan SPM created SPARK-23673:
--------------------------------

             Summary: PySpark dayofweek does not conform with ISO 8601
                 Key: SPARK-23673
                 URL: https://issues.apache.org/jira/browse/SPARK-23673
             Project: Spark
          Issue Type: Bug
          Components: PySpark, Spark Core
    Affects Versions: 2.3.0
            Reporter: Ivan SPM


The new function dayofweek, that returns 1 = Sunday and 7 for Saturday, does 
not conform with ISO 8601, that states that the first day of the week is 
Monday, so 1 = Monday and 7 = Sunday. This behavior is also different from 
Pandas, that uses 0 = Monday and 6 = Sunday, but pandas is at least consistent 
with the ordering of ISO 8601.

[https://en.wikipedia.org/wiki/ISO_8601#Week_dates]

(Also reported by Antonio Pedro Vieira (aps.vieir...@gmail.com))



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to