Quiz 2
Graded Quiz • 30 min Quiz10 Questions Week 2
Re⥃askly Logo

Quiz 2

Graded Quiz • 30 min Quiz10 Questions Week 2
Practice More Quizzes:
Quiz
10 Questions Week 1
Quiz
10 Questions Week 2
Quiz
10 Questions Week 3
Quiz
09 Questions Week 4

Q:

For the following code, which of the following statements will not return True? import pandas as pdsdata = {‘Ohio’: 35000, ‘Texas’: 71000, ‘Oregon’: 16000, ‘Utah’: 5000}obj1 = pd.Series(sdata)states = [‘California’, ‘Ohio’, ‘Oregon’, ‘Texas’]obj2 = pd.Series(sdata, index=states)obj3 = pd.isnull(obj2)

Q:

import pandas as pd d = {‘1’: ‘Alice’,’2′: ‘Bob’,’3′: ‘Rita’,’4′: ‘Molly’,’5′: ‘Ryan’}S = pd.Series(d)In the above python code, the keys of the dictionary d represent student ranks and the value for each key is a student name. Which of the following can be used to extract rows with student ranks that are lower than or equal to 3?

Q:

Suppose we have a DataFrame named df. We want to change the original DataFrame df in a way that all the column names are cast to upper case. Which of the following expressions is incorrect to perform the same?

Q:

For the given DataFrame df we want to keep only the records with a toefl score greater than 105. Which of the following will not work?

Q:

Which of the following can be used to create a DataFrame in Pandas?

Q:

Which of the following is an incorrect way to drop entries from the Pandas DataFrame named df shown below?

Q:

For the Series s1 and s2 defined below, which of the following statements will give an error? import pandas as pds1 = pd.Series({1: ‘Alice’, 2: ‘Jack’, 3: ‘Molly’})s2 = pd.Series({‘Alice’: 1, ‘Jack’: 2, ‘Molly’: 3})

Q:

Which of the following statements is incorrect?

Q:

For the given DataFrame df shown above, we want to get all records with a toefl score greater than 105 but smaller than 115. Which of the following expressions is incorrect to perform the same?

Q:

Which of the following is the correct way to extract all information related to the student named Alice from the DataFrame df given below:

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
Find Questions in This Page: "CTRL+F"