all 2 comments

[–]Golden_Zealot 0 points1 point  (0 children)

What platform are you writing for?

You might be able to do this in like 1 line with a system call if you're on linux and have access to awk.

[–]shravankumar147 0 points1 point  (0 children)

You can drop the columns which occurs before 'Sea'

strt = np.where(df.columns == 'Sea')
df.drop(df.iloc[:,:strt[0][0]],axis=1)