You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (Jira)" <ji...@apache.org> on 2023/01/13 03:29:00 UTC

[jira] [Updated] (SPARK-42027) CreateDataframe from Pandas with Struct and Timestamp

     [ https://issues.apache.org/jira/browse/SPARK-42027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hyukjin Kwon updated SPARK-42027:
---------------------------------
    Epic Link: SPARK-39375

> CreateDataframe from Pandas with Struct and Timestamp
> -----------------------------------------------------
>
>                 Key: SPARK-42027
>                 URL: https://issues.apache.org/jira/browse/SPARK-42027
>             Project: Spark
>          Issue Type: Bug
>          Components: Connect
>    Affects Versions: 3.4.0
>            Reporter: Martin Grund
>            Priority: Major
>
> The following should be supported and correctly truncate the nanosecond timestamps.
> {code:python}
> from datetime import datetime, timezone, timedelta
> from pandas import Timestamp
> ts=Timestamp(year=2019, month=1, day=1, nanosecond=500, tz=timezone(timedelta(hours=-8)))
> d = pd.DataFrame({"col1": [1], "col2": [{"a":1, "b":2.32, "c":ts}]})
> spark.createDataFrame(d).collect()
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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