[ https://issues.apache.org/jira/browse/SPARK-23673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16401392#comment-16401392 ]
Kazuaki Ishizaki commented on SPARK-23673: ------------------------------------------ In Spark, `dayofweek` comes from SQL. The result value is based on [ODBC standard|https://mariadb.com/kb/en/library/dayofweek/]. Would it be better to prepare another function that is compatible with Pandas? cc [~ueshin] [~bryanc] > 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 > Priority: Minor > > 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