Stream: python-questions

Topic: Loop Help


view this post on Zulip Muntaha Pasha (May 19 2021 at 19:25):

Hi all, I'm having a bit of a hard time wrapping my head around loop logic for a certain piece of code I need to write. Let's say I have a dataframe, that's over hundreds of lines long full of records of wind data from months. The only thing separating one record from the next that is identifiable, is a Pressure column. By that I mean each new record can be identified because the Pressure level of 1000mb repeats when a new record starts (ill include an image below). Say that I need to find certain things in each record. How can I start this loop, telling my code... For Pressure level between 1000mb and the last -9999.0 mb before the next record starts, do ___. I need it to loop between 1000mb and the last pressure value each time before a new record starts. Capture.PNG


Last updated: Jan 30 2022 at 12:01 UTC