Adding an extra column for title in for-loop

Published: 12/06/2019
Adding an extra column for title in for-loop
Source: STACKOVERFLOW.COM

I want to generate a column after the index, before the percentile values, to print the variable that i am for-looping in Var1. Any idea on how to do it? Var1 = ['A_Spend','B_Spend', 'C_Spend', 'D_Spend', 'completed_count', 'score'] df_drop_percentile_total= pd.DataFrame(columns=["10%", "20%", "30%", "40%", "50%", "60%", "70%", "80%", "90%", "100%"]) for i in Var1:

Read more
Related news
Comment
FACEBOOK