I cannot display/show/print a pivoted dataframe with PySpark. Although the dataframe seems to have been pivoted, when I try to use show() on it, it says AttributeError: 'GroupedData' object has no attribute 'show'
.
Here's the code
meterdata = sqlContext.read.format("com.databricks.spark.csv").option("delimiter", ",").option("header", "false").load("/CBIES/meters/")
metercols = meterdata.groupBy("C0").pivot("C1")
metercols.show()
Output: Traceback (most recent call last): File "/tmp/zeppelin_pyspark-8003809301447367155.py", line 239, in eval(compiledCode) File " ", line 1, in AttributeError: 'GroupedData' object has no attribute 'show'