$ pyspark
Python 2.7.5 (default, Aug 4 2017, 00:39:18)
// comment:some pyspark output are omitted
Using Python version 2.7.5 (default, Aug 4 2017 00:39:18)
SparkSession available as 'spark'.
>>> import handyspark
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/site-packages/handyspark/__init__.py", line 1, in <module>
from handyspark.extensions.evaluation import BinaryClassificationMetrics
File "/usr/lib/python2.7/site-packages/handyspark/extensions/__init__.py", line 2, in <module>
from handyspark.extensions.evaluation import BinaryClassificationMetrics
File "/usr/lib/python2.7/site-packages/handyspark/extensions/evaluation.py", line 3, in <module>
from handyspark.plot import roc_curve, pr_curve
File "/usr/lib/python2.7/site-packages/handyspark/plot.py", line 53
splits = np.linspace(*sdf.agg(F.min(col), F.max(col)).rdd.map(tuple).collect()[0], n + 1)
SyntaxError: only named arguments may follow *expression
Python modules' info:
$ pip list |grep -E "spark"
handyspark (0.2.1a1)
pyspark (2.4.0)
Only allow a starred expression as the last item in the exprlist. This would simplify the unpacking code a bit and allow for the starred expression to be assigned an iterator. This behavior was rejected because it would be too surprising.
When I use python2, I'll got the error as follow:
Python modules' info:
As PEP 3132 says:
This error only appear in python2.