set uuid as index pandas df code example Example: create uuid per row of df df['uuid'] = [uuid.uuid4() for _ in range(len(df.index))]