I use Spark 2.3.1 and want to use toPandas() (to use unique()).
When I execute the following code in pyspark:
df.toPandas()['column_01'].unique()
I'm facing the following exception:
>>> df.toPandas()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/xxx/spark/python/pyspark/sql/dataframe.py", line 2075, in toPandas
require_minimum_pandas_version()
File "/Users/xxx/spark/python/pyspark/sql/utils.py", line 129, in require_minimum_pandas_version
"it was not found." % minimum_pandas_version)
ImportError: Pandas >= 0.19.2 must be installed; however, it was not found.
How to fix it?