• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
October 25, 2022 |490 Views
Selecting Rows in Pandas DataFrame Based on Conditions
  Share   Like
Description
Discussion

Selecting rows based on particular column value using '>', '=', '=', '<=', '!=' operator.

Code #1 : Selecting all the rows from the given dataframe in which ‘Percentage’ is greater than 80 using basic method.

Code #2 : Selecting all the rows from the given dataframe in which ‘Percentage’ is greater than 80 using loc[].

 

Related Article :  https://www.geeksforgeeks.org/selecting-rows-in-pandas-dataframe-based-on-conditions/