insert a new column in python code example Example: insert new column to dataframe group = np.random.randint(10, size=6) df_new['Group'] = group