English

Write the python statements to print the sum of the english marks scored by Mishti.

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?
Chapter 3: Data Handling using Pandas - II - Intext Questions [Page 69]

APPEARS IN

NCERT Informatics Practices [English] Class 12
Chapter 3 Data Handling using Pandas - II
Intext Questions | Q 2 | Page 69
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×