sparkmagic icon indicating copy to clipboard operation
sparkmagic copied to clipboard

sparkmagic displays pandas DataFrames as texts

Open sergun opened this issue 6 years ago • 9 comments

Hi!

A have an issue with displaying pandas DataFrame in sparkmagic. They are always displayed as text.

Any ideas?

sparkmagic 0.12.6 livy 0.5

sergun avatar Nov 10 '18 16:11 sergun

      Hi!

A have an issue with displaying pandas DataFrame in sparkmagic. They are always displayed as text. Any ideas? sparkmagic 0.12.6 livy 0.5

Hi! I have exactly the same issue with plotly, did you fix that or have any ideas ? sparkmagic 0.12.6

bakousylla avatar Nov 24 '18 16:11 bakousylla

Hi, same here, and I'd love a fix!!

Bootcampanalytics avatar Sep 05 '19 15:09 Bootcampanalytics

Have you tried the latest version, 0.12.9?

itamarst avatar Sep 05 '19 16:09 itamarst

Have you tried the latest version, 0.12.9?

Yes, this is the version that AWS uses today.

I posted this here: https://stackoverflow.com/questions/57794930/pandas-formatting-in-emr-notebooks-in-cluster-mode-or-transferring-to-local-with

Bootcampanalytics avatar Sep 05 '19 18:09 Bootcampanalytics

@analytics-bootcamp I doubt it if it's EMR. EMR notebook is using 0.12.7 as of EMR 5.26 version.

devender-yadav avatar Sep 05 '19 18:09 devender-yadav

@analytics-bootcamp I doubt it if it's EMR. EMR notebook is using 0.12.7 as of EMR 5.26 version.

This is what I did:

In AWS, I start a cluster and open an EMR notebook.

import sparkmagic as sm. -> error.

next try: %local import sparkmagic as sm print (sm.__version__)

-> 0.12.9

Bootcampanalytics avatar Sep 05 '19 18:09 Bootcampanalytics

Looks like they updated it in last 1-2 days. I noticed progress bar in EMR notebook today.

devender-yadav avatar Sep 05 '19 18:09 devender-yadav

Can you give me an easy way to reproduce this? Thanks!

itamarst avatar Sep 24 '19 20:09 itamarst

@itamarst

spark_df = spark.read.parquet("s3://path_to_parquet")
pandas_df = spark_df.limit(100).to_pandas()
pandas_df
> shows text instead of html markup in emr jupyter lab or jupyter notebook

jwillis0720 avatar Jun 21 '21 22:06 jwillis0720