Skip to main content

Posts

Showing posts with the label 4. Write a Pandas program to select the rows where the percentage greater than 70.

ads1

4. Write a Pandas program to select the rows where the percentage greater than 70.

  4. Write a Pandas program to select the rows where the percentage greater than 70. Solution :-  import pandas as pd import numpy as np exam_data = {'name':['abc','xyz','mno','pqr','ghk'],              'perc':[79.25,25,69.90,86,87],              'qualify':['yes','no','yes','yes','yes']} labels = ['A','B','C','D','E'] df = pd.DataFrame(exam_data, index = labels) print("Number of Studemt whoes percentage more than 70 :- ") print(df[df['perc']>70]) Output :- 

ads2