
Quiz 10
Authored by Mohand Mahmoud
Computers
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
what is output:
import pandas as pd
mydataset = {
'cars': ["BMW", "Volvo", "Ford"],
'passings': [3, 7, 2]
}
myvar = pd.DataFrame(mydataset)
print(myvar)
cars passings
0 BMW 3
1 Volvo 7
2 Ford 2 cars passings
BMW 3
Volvo 7
Ford 20 1
1 7
2 2
dtype: int64ERORR
2.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
How to make Empty DataFrame ???
import pandas
myvar = pandas.DataFrame()
print(myvar)
import pandas
myvar = pandas.DataFrame.empty()
print(myvar)
import pandas
print(pandas.DataFrame.empty())
3.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
import pandas as pd
a = [1, 7, 2]
myvar = pd.Series(a)
print(myvar) what is output ??
0 1
1 7
2 2
dtype: int64 cars passings
0 BMW 3
1 Volvo 7
2 Ford 2cars passings
BMW 3
Volvo 7
Ford 2Error
4.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
import pandas as pd
a = [1, 7, 2]
myvar = pd.Series(a)
print(myvar[1])
1
7
2
NAN
5.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
import pandas as pd
a = [1, 7, 2]
myvar = pd.Series(a, index = ["x", "y", "z"])
print(myvar["y"])
y
"y"
1
Non of them
6.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
import pandas as pd
calories = {"day1": 420, "day2": 380, "day3": 390}
myvar = pd.Series(calories, index = ["day1", "day2"])
print(myvar)
what is output????
day1 420
day2 380
dtype: int640 420
1 380
dtype: int64 420 day1
380 day2
dtype: int64Non of them
7.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
what is output : import pandas as pd
data = {
"calories": [420, 380, 390],
"duration": [50, 40, 45]
}
myvar = pd.DataFrame(data)
print(myvar)
Error
420 50
380 40
390 45
dtype: int6450 420
40 380
45 390
dtype: int64 calories duration
0 420 50
1 380 40
2 390 45Access 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 Microsoft
or continue with
%20(1).png)
Apple
Others
Already have an account?