Question
1. s is a Pandas Series object. How would you get to its index? Group of answer choices s.values s.index s.indices s.describe 2. In Python,
1. s is a Pandas Series object. How would you get to its index?
Group of answer choices
- s.values
- s.index
- s.indices
- s.describe
2. In Python, you can use [ ] to access Series, but when you use [[ ]] on Series, what operation is the outer '[ ]' performing?
Group of answer choices
- nothing
- creating a list
- creating a dictionary
- performing the indexing
3. The following is a valid Series operation:
(s-s.mean())/s
Group of answer choices
- True
- False
4. Which of the following is true for iloc when operating with Series?
Group of answer choices
- Returns copy
- Selects rows using the positional index (integer)
- Selects rows using the named index
5. A homework assignment is a Pandas Series object with student names as index and their homework scores as values. How would you select students whose score is less than 5 or greater than 9?
Group of answer choices
- hw[(hw<5)] OR hw[(hw>9)]
- hw[(hw<5)] | hw[(hw>9)]
- hw[(hw<5) OR (hw>9)]
- hw[(hw<5) | (hw>9)]
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored 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