I would like to create a new column for my dataframe named \"Id\" where the value is the row index +1. I would like to be like the example below:
ID Col
You can add one to the index and assign it to the id column:
id
df = pd.DataFrame({"Col1": list("abc")}) df["id"] = df.index + 1 df #Col1 id #0 a 1 #1 b 2 #2 c 3