Reputation: 1027
My initial data set are:
{'ID': [Row(userid=17562323, gross_merchandise_value=6072210944, country=u'ID'), Row(userid=29989283, gross_merchandise_value=4931252224, country=u'ID')]
the type of dict value is pyspark.sql.types.Row
How to convert the dict to the userid list? like below:
[17562323, 29989283],
just get the userid list.
Upvotes: 9
Views: 27175
Reputation: 1027
thank you above all,the problem solved.I use row_ele.asDict()['userid'] in old_row_list to get the new_userid_list
Upvotes: 5