[
https://issues.apache.org/jira/browse/SPARK-36930?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
dch nguyen updated SPARK-36930:
-------------------------------
Description:
When DF.dtypes is supported, we can use
{code:java}
>>> pdf = pd.DataFrame(
... {"a": [1, 2, 3, 4, 5, 6, 7, 8, 9], "b": [4, 5, 6, 3, 2, 1, 0, 0, 0]},
... )
>>> psdf = ps.from_pandas(pdf)
>>> psdf.dtypes
a int64
b int64
dtype: object
>>> ps.DataFrame[psdf.dtypes]
typing.Tuple[pyspark.pandas.typedef.typehints.NameType,
pyspark.pandas.typedef.typehints.NameType]
{code}
> Support ps.DataFrame.dtypes
> ---------------------------
>
> Key: SPARK-36930
> URL: https://issues.apache.org/jira/browse/SPARK-36930
> Project: Spark
> Issue Type: Sub-task
> Components: PySpark
> Affects Versions: 3.3.0
> Reporter: dch nguyen
> Priority: Major
>
> When DF.dtypes is supported, we can use
>
> {code:java}
> >>> pdf = pd.DataFrame(
> ... {"a": [1, 2, 3, 4, 5, 6, 7, 8, 9], "b": [4, 5, 6, 3, 2, 1, 0, 0, 0]},
> ... )
> >>> psdf = ps.from_pandas(pdf)
> >>> psdf.dtypes
> a int64
> b int64
> dtype: object
> >>> ps.DataFrame[psdf.dtypes]
> typing.Tuple[pyspark.pandas.typedef.typehints.NameType,
> pyspark.pandas.typedef.typehints.NameType]
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]