हिंदी

Mumbai 29 21 35.2 Kolkata 39 23 41.8 Which of the following command will display the sum of every column of the data frame?

Advertisements
Advertisements

प्रश्न

Consider the following DataFrame df and answer the following query.

City Max temp Min Temp RainFall
Delhi 40 32 24.1
Bengaluru 31 25 36.2
Chennai 35 27 40.8
Mumbai 29 21 35.2
Kolkata 39 23 41.8

Which of the following command will display the sum of every column of the data frame? 

विकल्प

  • print(df. sum(axis = 1))

  • print(df. sum(axis = column))

  • print( df. sum(),axis = 1)

  • print(df. sum())

MCQ
Advertisements

उत्तर

print(df. sum())

Explanation:

The data frame's column-wise sum will be calculated using df. sum().

shaalaa.com
Descriptive Statistics
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×