Add an index to a dataframe. Pyspark 2.4.4

后端 未结 0 552
遇见更好的自我
遇见更好的自我 2021-02-04 07:55

There are a lot of examples that all give the same basic example.

dfWithIndex = df.withColumn(\'f_index\', \\ 
  pyspark.sql.functions.lit(1).cast(pyspark.sql.typ         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题