Ben Chuanlong Du's Blog

It is never too late to learn.

Group-by Plots in HoloViews

There are many ways to achievie groupby in HolovViews.

  1. Directly use the groupby method of HoloViews objects!!!

  2. Use the method HoloMap to create a dictionary of parameters to HoloViews objects.

  3. Use the method dataset.to which has groupby option. However, it seems to me that this doesn't give me options to select which one to show. But with click and transparent parameters configured, you can achieve similar effect ...

Aggregate DataFrames in Spark

Aggregation Without Grouping

  1. You can aggregate all values in Columns of a DataFrame. Just use aggregation functions in select without groupBy, which is very similar to SQL syntax.

  2. The aggregation functions all and any are available since Spark 3.0. However, they can be achieved using other aggregation functions such as sum