File "/Users/s.singh/personal/spark-oss/python/pyspark/sql/connect/dataframe.py", line 302, in pyspark.sql.connect.dataframe.DataFrame.groupBy
Failed example:
df.groupBy(["name", df.age]).count().sort("name", "age").show()
Exception raised:
Traceback (most recent call last):
File "/usr/local/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/doctest.py", line 1350, in __run
exec(compile(example.source, filename, "single",
File "<doctest pyspark.sql.connect.dataframe.DataFrame.groupBy[4]>", line 1, in <module>
df.groupBy(["name", df.age]).count().sort("name", "age").show()
File "/Users/s.singh/personal/spark-oss/python/pyspark/sql/connect/dataframe.py", line 251, in groupBy
raise TypeError(
TypeError: groupBy requires all cols be Column or str, but got list ['name', Column<'ColumnReference(age)'>]