# Selecting rows in pandas DataFrame based on conditions in Python 
 # importing pandas
import pandas as pd
  
record = {
  
 'Name': ['Ankit', 'Amit', 'Aishwarya', 'Priyanka', 'Priya', 'Shaurya' ],
 'Age': [21, 19, 20, 18, 17, 21],
 'Stream': ['Math', 'Commerce', 'Science', 'Math', 'Math', 'Science'],
 'Percentage': [88, 92, 95, 70, 65, 78] }
  
# create a dataframe
dataframe = pd.DataFrame(record, columns = ['Name', 'Age', 'Stream', 'Percentage'])
  
print("Given Dataframe :\n", dataframe) 
  
# selecting rows based on condition
rslt_df = dataframe[dataframe['Percentage'] > 80]
  
print('\nResult dataframe :\n', rslt_df)