Give the output of the following code:
>>>import pandas as pd
>>>dict1 = {'AR' : 100, 'VR' : 200, 'AI' : 300}
>>>ser = pd.Series(dict1)
>>>print(ser[1])
Python Pandas
Quiz
•
Computers
•
12th Grade
•
Hard
Learning VG
Used 62+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Give the output of the following code:
>>>import pandas as pd
>>>dict1 = {'AR' : 100, 'VR' : 200, 'AI' : 300}
>>>ser = pd.Series(dict1)
>>>print(ser[1])
AR
100
VR
200
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
print(ser[2,4])
print(ser[[2:4]])
print(ser[[2,4]])
print(ser[2,3,4])
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
print(ser[[1,3]])
print(ser[1:3])
print(ser[[1:3]])
print(ser[1,3])
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Let us suppose ser is a series. What will be the print statement to display last 3 elements?
print(ser.head(3))
print(ser.tail(3))
print(ser.head())
print(ser.tail())
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the print statement to display the elements of a series series1 from end till beginning in step 2?
print(series1[::-2])
print(series1[::2])
print(series1[:-2:])
print(series1[:2:])
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
pd.DataFrame(DICT1, columns=["NAME","DOB"])
pd.DataFrame(DICT1, index=["NAME","DOB"])
pd.DataFrame(DICT1, index=["NAME":"DOB"])
pd.DataFrame(DICT1, columns=["NAME":"DOB"])
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
print(pd.DataFrame(DICT1, index=[1,2,3], columns=["NAME","SCODE"]))
print(pd.DataFrame(DICT1, index=[501,502,503], columns=["NAME","SCODE"]))
print(pd.DataFrame(DICT1, index=[501,502,503], columns=["NAME":"SCODE"]))
print(pd.DataFrame(DICT1, index=[501:503], columns=["NAME","SCODE"]))
15 questions
Basic Python Coding
Quiz
•
11th - 12th Grade
15 questions
Python Revision Tour - I
Quiz
•
12th Grade
10 questions
Avaliação Pensamento Computacional - Prático
Quiz
•
1st Grade - Professio...
10 questions
Python 4tos 2
Quiz
•
12th Grade
13 questions
Python Fundamentals and Programming
Quiz
•
11th - 12th Grade
15 questions
Grade 12-Python selection&iteration
Quiz
•
11th - 12th Grade
15 questions
ASK F2 -KOD ARAHAN (PYTHON)
Quiz
•
1st Grade - University
12 questions
Python Operators
Quiz
•
12th Grade
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
20 questions
Taxes
Quiz
•
9th - 12th Grade
17 questions
Parts of Speech
Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression
Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing
Quiz
•
9th - 12th Grade
10 questions
Identifying equations
Quiz
•
KG - University