Get first row of dataframe in Python Pandas based on ...
· This will return a slice of your dataframe which you can index using iloc. Here are your examples: Get first row where A > 3 (returns row 2) >>> df [ > 3].iloc [0] A 4 B 6 C 3 Name: 2, dtype: int64. If what you actually want is the row number, rather .