July 2018
Intermediate to advanced
474 pages
13h 37m
English
This section walks through the steps to convert the Spark dataframe into a visualization that can be seen in the Jupyter notebook.
df_plot = df.select('id', 'word_count').toPandas()
import matplotlib.pyplot as plt%matplotlib inlinedf_plot.set_index('id', inplace=True)df_plot.plot(kind='bar', figsize=(16, 6))plt.ylabel('Word Count')plt.title('Word Count distribution')plt.show()
Read now
Unlock full access