So I tried to do some beginner data science stuff in excel with Python Pandas, here's the original data example: Mainly what I want is the data on the left.
After coding, I could get the result to be like this: the main data I want are the yellow ones, blue ones are kinda situational.
The problem I'm facing now is: I wanna get the sum of the yellow ones' data, but can't find the right way to do it. Ultimately, I'd like to get the yellow ones' data sum, BUT, ignore those black marks that appear at row 6 (偏離) or row 22, I wanna ignore those situation's.
Here are my codes so far: enter image description here