For a pandas DataFrame whose index starts at 0 and increments by 1 (i.e., the default values) you can just do:
df.insert(0, 'New_ID', df.index + 880)
if you want New_ID
to be the first column. Otherwise this if you don't mind it being at the end:
df['New_ID'] = df.index +
β¦
Top comments (0)