7

I create a pyspark dataframe and i want to see it in the SciView tab in PyCharm when i debug my code (like I used to do when i have worked with pandas). It says "Nothing to show" (the dataframe exists, I can see it when I use the show() command).

someone knows how to do it or maybe there is no integration between pycharm and pyspark dataframe in this case?

1
  • 1
    Beware that any such action if possible will mean collecting data from all executor into driver memory...which for large data size may result into crash...show/head etc. are safer alternative to just show sample data
    – abhiieor
    Commented Dec 5, 2018 at 8:18

1 Answer 1

8

Pycharm does not support spark dataframes, you should call the toPandas() method on the dataframe. As @abhiieor mentioned in a comment, be aware that you can potentially collect a lot of data, you should first limit() the number of rows returned.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.