Skip to content

Instantly share code, notes, and snippets.

@arashbehmand
Created March 29, 2020 08:22
Show Gist options
  • Save arashbehmand/326c8b6ac9ccfe350bf2d85fe390cfaf to your computer and use it in GitHub Desktop.
Save arashbehmand/326c8b6ac9ccfe350bf2d85fe390cfaf to your computer and use it in GitHub Desktop.
[spark-df-profiling] #pyspark
%pyspark
# PersonalPip.install("spark-df-profiling")
# PersonalPip.install('pandas==0.25.1',upgrade=True)
import spark_df_profiling
import io
import tempfile
profile = spark_df_profiling.ProfileReport(df)
mem_buf = io.BytesIO()
print('%html')
with tempfile.NamedTemporaryFile() as tmp:
profile.to_file(outputfile=tmp.name)
tmp.seek(0)
print(tmp.read().decode('utf8'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment