how to add the column to the beginning of dataframe

40

# Third position would be at index 2, because of zero-indexing.
df.insert(2, 'new-col', data)

Comments

Submit
0 Comments