Skip to content
Advertisement

Excel column manipulation

I am trying to find cell named North and take everything below it I know that we can easily locate this using loc and iloc, but in my case it may vary every time my app opens new excel file. I tried using str.contains

enter image description here

Advertisement

Answer

Try with iloc and idxmax:

df.iloc[df.eq('North').any(1).idxmax():]
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement