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

Haejoon Lee updated SPARK-37657:
--------------------------------
    Description: 
Initialized in Koalas issue: [https://github.com/databricks/koalas/issues/1888.]

 

The `DataFrame.describe()` in pandas API on Spark doesn't work properly when 
DataFrame has no numeric column.

 

 
{code:java}
>>> df = ps.DataFrame({'a': ["a", "b", "c"]})
>>> df.describe()
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "/.../python/pyspark/pandas/frame.py", line 7582, in describe
  raise ValueError("Cannot describe a DataFrame without columns")
ValueError: Cannot describe a DataFrame without columns 
{code}
 

As it works fine in pandas, we should fix it.

  was:
Initialized in Koalas issue: [https://github.com/databricks/koalas/issues/1888.]

 

The `DataFrame.describe()` in pandas API on Spark doesn't work properly when 
DataFrame has no numeric column.

 

 
{code:java}
>>> df = ps.DataFrame({'a': ["a", "b", "c"]})
>>> df.describe()
Traceback (most recent call last): File "<stdin>", line 1, in <module> File 
"/.../python/pyspark/pandas/frame.py", line 7582, in describe raise 
ValueError("Cannot describe a DataFrame without columns") ValueError: Cannot 
describe a DataFrame without columns 
{code}
 

As it works fine in pandas, we should fix it.


> Fix the bug in ps.DataFrame.describe()
> --------------------------------------
>
>                 Key: SPARK-37657
>                 URL: https://issues.apache.org/jira/browse/SPARK-37657
>             Project: Spark
>          Issue Type: Improvement
>          Components: PySpark
>    Affects Versions: 3.3.0
>            Reporter: Haejoon Lee
>            Priority: Major
>
> Initialized in Koalas issue: 
> [https://github.com/databricks/koalas/issues/1888.]
>  
> The `DataFrame.describe()` in pandas API on Spark doesn't work properly when 
> DataFrame has no numeric column.
>  
>  
> {code:java}
> >>> df = ps.DataFrame({'a': ["a", "b", "c"]})
> >>> df.describe()
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
>  File "/.../python/pyspark/pandas/frame.py", line 7582, in describe
>   raise ValueError("Cannot describe a DataFrame without columns")
> ValueError: Cannot describe a DataFrame without columns 
> {code}
>  
> As it works fine in pandas, we should fix it.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to