Cannoted display/show/print pivoted dataframe in with PySpark. Although apparently created pivoted dataframe fine, when try to show 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 <module>
eval(compiledCode)
File "<string>", line 1, in <module>
AttributeError: 'GroupedData' object has no attribute 'show'