Counter function on a ArrayColumn Pyspark
问题 From this data frame +-----+-----------------+ |store| values | +-----+-----------------+ | 1|[1, 2, 3,4, 5, 6]| | 2| [2,3]| +-----+-----------------+ I would like to apply the Counter function to get this: +-----+------------------------------+ |store| values | +-----+------------------------------+ | 1|{1:1, 2:1, 3:1, 4:1, 5:1, 6:1}| | 2|{2:1, 3:1} | +-----+------------------------------+ I got this data frame using the answer of another question : GroupBy and concat array columns pyspark