Answer to Question #231132 in Python for Rachna Pal

Question #231132

write a python function to find the record with highest and lowest marks obtained by student from a file result.csv having field (name , total_marks)


1
Expert's answer
2021-09-06T00:16:47-0400
import pandas as pd
df = pd.read_csv('result.csv')
def find_stats():
    high = df[(df['total_marks'] == df['total_marks'].max())|(df['total_marks'] == df['total_marks'].min())]
    return high
find_stats()

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS