Try this: https://spark.apache.org/docs/latest/api/python/reference/api/pyspark.sql.functions.monotonically_increasing_id.html
On Mon, 7 Feb 2022 at 12:27 pm, <capitnfrak...@free.fr> wrote: > For a dataframe object, how to add a column who is auto_increment like > mysql's behavior? > > Thank you. > > --------------------------------------------------------------------- > To unsubscribe e-mail: user-unsubscr...@spark.apache.org > > -- Best Regards, Ayan Guha