Royal
Royal

Reputation: 208

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

Upvotes: 0

Views: 56

Answers (1)

U13-Forward
U13-Forward

Reputation: 71580

Try with iloc and idxmax:

df.iloc[df.eq('North').any(1).idxmax():]

Upvotes: 2

Related Questions