i need to sort the lignes of pyspark data frame , the only solutions that i found is how to sort a whole column . To be more clear , i want this
to give me : [3 , 19]
with no changes in the order of column
Thank you
CodePudding user response:
i found this solution and it worked with me :
from pyspark.sql.functions import array_sort
dataframe = dataframe.withColumn('column name', F.array_sort('column name'))