I have a DataFrame with 105 columns.I want to bring the last column in the middle of a dataframe.How can i achieve that.
col1 col2 col3 col4 col5 col6 col7 col8 col9 col10 col11 col12 col13 col14 col15
The output should look like
col1 col2 col3 col4 col5 col6 col7 col15 col8 col9 col10 col11 col12 col13 col14
df.iloc[:,list(range(7))+ [-1]]
The above code works for the first 7 cols and the last column but i got stuck on how to get the remaining column