Construct a pivot table over a Spark Dataframe, using a syntax similar to
sdf_pivot(x, formula, fun.aggregate = "count")
x_1 + x_2 + ... ~ y_1. The left-hand side of the formula indicates which variables are used for grouping, and the right-hand side indicates which variable is used for pivoting. Currently, only a single pivot column is supported.