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
- hw.sort_index().tail(1).values[0]
- hw.sort_index(ascending=False)[[0]]
- hw.sort_index().tail(1)
- 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
- It is a dummy value
- You can skip it because it is optional
- 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
- negatively correlated
- weakly correlated
- strongly correlated
- zero correlation
9. Which of the following can you use to access the maximum value in a Series?
Group of answer choices
- s.sort_values()[0]
- s.idxmax()
- s.sort()
- s.max()
10. How can you change the datatype of a Series?
Group of answer choices
- type
- astype
- We can't change the data type of a series
- dtype
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started