koalas
koalas copied to clipboard
ValueError: Cannot describe a DataFrame without columns
Hi,
I am using koalas in Cloudera Spark 2.4.0 and when I describe dataframe, I get "ValueError: Cannot describe a DataFrame without columns".
`
type(ekko_df)
databricks.koalas.frame.DataFrame
ekko_df.columns Index(['client', 'purchasing_document', 'company_code', 'purch_doc_category', 'purchasing_doc_type', 'control_indicator', 'deletion_indicator', 'status', 'created_on', 'created_by', ... 'budget_type', 'otb_check_status', 'otb_reason_reason', 'type_of_otb_check', 'otb_relevant_contract', 'indicator_level_for_contracts', 'distrib_using_target_value_or_item_data', 'swap_contract', 'externalsystem', 'externalreferenceid'], dtype='object', length=156)
ekko_df.describe()
Traceback (most recent call last): File "", line 1, in File "/opt/anaconda3/envs/python_3_6_environment/lib/python3.6/site-packages/databricks/koalas/frame.py", line 7552, in describe raise ValueError("Cannot describe a DataFrame without columns") ValueError: Cannot describe a DataFrame without columns
`
Can you show the types of your DataFrame? It's possible that your DataFrame does not have any numeric types:
>>> df = ks.DataFrame({'a': ["a", "b", "c"]})
>>> df.describe()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/.../koalas/databricks/koalas/frame.py", line 7582, in describe
raise ValueError("Cannot describe a DataFrame without columns")
ValueError: Cannot describe a DataFrame without columns
It works in pandas so we should probably fix too.
Let me take a look at this one.
What is the status on this?
@lgallindo We currently focus on pandas API on Spark, which is ported Koalas into PySpark.
I just created related ticket here, and will fix it in pandas API on Spark first.
I'd recommend you to use PySpark as we actively update features and bug fix there, and now the Koalas repository is now in maintenance mode.