You can delete column on i
index like this:
df.drop(df.columns[i], axis=1)
It could work strange, if you have duplicate names in columns, so to do this you can rename column you want to delete column by new name. Or you can reassign DataFrame like this:
df = df.iloc[:, [j for j, c in enumerate(df.columns) if j != i]]
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…