Quiz 10

Quiz 10

University

10 Qs

quiz-placeholder

Similar activities

codestorm

codestorm

University

10 Qs

ITC121-Quiz03

ITC121-Quiz03

University

15 Qs

Introduction to Python

Introduction to Python

University

15 Qs

Lesson 3 Recap

Lesson 3 Recap

University

6 Qs

Anadatos 2

Anadatos 2

University

11 Qs

GenG Data Science Quiz

GenG Data Science Quiz

University

15 Qs

strings

strings

University

15 Qs

unit1

unit1

University

15 Qs

Quiz 10

Quiz 10

Assessment

Quiz

Computers

University

Medium

Created by

Mohand Mahmoud

Used 1+ times

FREE Resource

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         2
0    1
1    7
2    2
dtype: int64

ERORR

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         2
cars  passings
   BMW         3
  Volvo         7
   Ford         2

Error

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: int64
0      420
1      380
dtype: int64
  420   day1    
  380    day2    
dtype: int64

Non 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: int64
50      420
40      380
45      390
dtype: int64
   calories  duration
0       420        50
1       380        40
2       390        45

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?