28787
DISCUSSIONS
102103
MEMBERS
3161
ARTICLES
Created 10-16-2017 06:02 AM
Hi,
I'm novice in pyspark.I'm using spark version 2.0.2 & python 2.7.I want to add index column in my data frame.So I used following code
z=np.array(np.arange(data.count()), dtype=np.int32)
data1 = data.withColumn('index', z)
But I'm getting error message as
AssertionError: col should be Column
Can you please help me to solve the error?