
Python series
Quiz
•
Computers
•
12th Grade
•
Hard
Lalita Joshi
Used 4+ times
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Write the output for the following:
import pandas as pd1
s = pd1.Series(5, index=[0, 1, 2, 3])
print(s)
0 5
0 5
1 5
2 5
3 5
dtype: int64
1 5
2 5
2 5
4 5
dtype: int64
0 5
1 5
2 5
3 5
dtype: object
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
write the output:
import pandas as pd1
s = pd1.Series([1,2,3])
t = pd1.Series([1,2,4])
u=s-t
print (u)
0 1
1 0
2 1
dtype: int64
0 0
1 0
2 1
dtype: int64
0 0
1 0
2 -1
dtype: float64
0 0
1 0
2 -1
dtype: int64
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
write the output:
import pandas as pd
s=pd.Series([1,2,3,4],index=['a','b','c','d'])
print(s.iloc[2:4])
b 2
c 3
d 4
dtype: int64
b 3
c 4
dtype: int64
c 3
d 4
dtype: int64
none of the above
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
write the output:
import pandas as pd
s=pd.Series([1,2,3,4],index=['a','b','c','d'])
print(s.loc['b':'d'])
b 2
c 3
d 4
dtype: float64
b 2
c 3
d 4
dtype: object
c 3
d 4
dtype: int64
b 2
c 3
d 4
dtype: int64
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Create an empty series S1
S1 = pandas.Series(empty)
S1 = pandas.series(numpy.Nan)
S1 = pandas.Series()
S1 = pandas.Series(null)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
To specify data type int 16 for a series object s1 we can write
s1 = pd.Series(data = numpy.array([2,3,4]), dtype = int16)
s1 = pd.Series(data = numpy.array([2,3,4]), dtype = numpy. int16)
s1 = pd.Series(data = numpy.array([2,3,4]), dtype =pandas. int16)
all of the above
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which is the correct Pandas syntax to read in a csv file and assign it to a DataFrame df?
df = read_csv('file.csv')
df = read('file.csv', type = 'csv')
df = pd.read_csv('file.csv')
df = with open('file.csv') as pd.DataFrame
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
12 questions
Vocaloid
Quiz
•
KG - Professional Dev...
10 questions
Small Basic (Turtle)
Quiz
•
KG - University
20 questions
Internet Review Unit 2 code.org
Quiz
•
9th - 12th Grade
20 questions
Alles über YouTube
Quiz
•
5th Grade - University
17 questions
WJEC ICT - Chapter 2 - Network Hardware
Quiz
•
10th Grade - University
10 questions
Python with DataScience
Quiz
•
7th Grade - University
10 questions
SDD HSC Quiz 5A Q1-10
Quiz
•
12th Grade
10 questions
Arrays and Lists
Quiz
•
6th - 12th Grade
Popular Resources on Wayground
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Comparing Fractions
Quiz
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Latin Bases claus(clois,clos, clud, clus) and ped
Quiz
•
6th - 8th Grade
22 questions
fractions
Quiz
•
3rd Grade
7 questions
The Story of Books
Quiz
•
6th - 8th Grade
Discover more resources for Computers
8 questions
2 Step Word Problems
Quiz
•
KG - University
10 questions
Martin Luther King, Jr. For Kids
Interactive video
•
1st - 12th Grade
10 questions
Dr. King's Speech and Its Impact
Interactive video
•
7th - 12th Grade
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
7 questions
Anti-Bullying ARS 15-341
Quiz
•
9th - 12th Grade
13 questions
Model Exponential Growth and Decay Scenarios
Quiz
•
9th - 12th Grade
15 questions
TSI Math Practice Questions
Quiz
•
8th - 12th Grade
24 questions
Identify Properties of Polygons and Quadrilaterals
Quiz
•
9th - 12th Grade
