Question: 6. A homework assignment is a Pandas Series object with student names as index and their homework scores as values. How would you retrieve the

6. A homework assignment is a Pandas Series object with student names as index and their homework scores as values. How would you retrieve the name only of the person who comes last when placed in alphabetical order?

Group of answer choices

  1. hw.sort_index().tail(1).values[0]
  2. hw.sort_index(ascending=False)[[0]]
  3. hw.sort_index().tail(1)
  4. hw.sort_index().tail(1).index[0]

7. Rolling() method can be used to calculate moving average (mean) in Python Pandas Package, but it takes Windows as an argument. What value does that imply?

Group of answer choices

  1. It is a dummy value
  2. You can skip it because it is optional
  3. The number of observations used for calculating the statistic

8. What kind of correlation will it be if the output of a corr() method is close to 1?

Group of answer choices

  1. negatively correlated
  2. weakly correlated
  3. strongly correlated
  4. zero correlation

9. Which of the following can you use to access the maximum value in a Series?

Group of answer choices

  1. s.sort_values()[0]
  2. s.idxmax()
  3. s.sort()
  4. s.max()

10. How can you change the datatype of a Series?

Group of answer choices

  1. type
  2. astype
  3. We can't change the data type of a series
  4. dtype

.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!