Making histogram with Spark DataFrame column
<p>I am trying to make a histogram with a column from a dataframe which looks like</p>

<pre><code>DataFrame[C0: int, C1: int, ...]
</code></pre>

<p>If I were to make a histogram with the column C1, what should I do?</p>

<p>Some things I have tried are</p>

<pre><code>df.groupBy("C1").count().histogram()
df.C1.countByValue()
</code></pre>

<p>Which do not work because of mismatch in data types. </p>