Advertisements
Advertisements
Question
Write the python statements to print the sum of the english marks scored by Mishti.
Code Writing
Advertisements
Solution
dfMishti = df[df['Name'] == 'Mishti']
print(dfMishti['Eng'].sum())
Explanation:
df[df['Name']=='Mishti']selects only the rows containing Mishti's marks.dfMishti['Eng'].sum()calculates the total English marks scored by Mishti.
shaalaa.com
Is there an error in this question or solution?
