Quiz 5.1

Quiz 5.1

Professional Development

20 Qs

quiz-placeholder

Similar activities

BOP-1

BOP-1

University - Professional Development

15 Qs

Викторина Pandas

Викторина Pandas

Professional Development

19 Qs

While

While

Professional Development

17 Qs

SPARK FIDDLE

SPARK FIDDLE

Professional Development

20 Qs

Basics of programming - Quiz - 01

Basics of programming - Quiz - 01

University - Professional Development

20 Qs

C

C

Professional Development

20 Qs

C-Quest

C-Quest

Professional Development

20 Qs

Sains Komputer Tingkatan 5 - 1.3.3 Membina Jadual Kebenaran

Sains Komputer Tingkatan 5 - 1.3.3 Membina Jadual Kebenaran

1st Grade - Professional Development

15 Qs

Quiz 5.1

Quiz 5.1

Assessment

Quiz

Computers

Professional Development

Practice Problem

Medium

Created by

Mohand Mahmoud

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

what is output:

import pandas as pd

mydataset = {

'cars': ["BMW", "Volvo", "Ford"],

'passings': [3, 7, 2]

}

myvar = pd.DataFrame(mydataset)

 cars  passings
    BMW         3
  Volvo         7
   Ford         2
cars  passings
0    BMW         3
1  Volvo         7
2   Ford         2
0    1
1    7
2    2
dtype: int64

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How to make Empty DataFrame ???

import pandas
myvar = pandas.DataFrame()

print(myvar)

import pandas
print(pandas.DataFrame.empty())

import pandas
myvar = pandas.DataFrame.empty()

print(myvar)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

Error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

import pandas as pd

a = [1, 7, 2]

myvar = pd.Series(a)

print(myvar[1])


1

2

NAN

all choisies is wrong

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

import pandas as pd

a = [1, 7, 2]

myvar = pd.Series(a, index = ["x", "y", "z"])

print(myvar["y"])


y

"y"

NAN

all choisies is wrong

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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 • 1 pt

what is output :

import pandas as pd

data = {

"calories": [420, 380, 390],

"duration": [50, 40, 45]

}

#load data into a DataFrame object:

df = pd.DataFrame(data)

print(df.loc[0])



calories 380 duration 40 Name: 0, dtype: int64


calories 390 duration 45 Name: 0, dtype: int64

calories    420
duration     50
Name: 0, dtype: int64


calories 420 duration 50 Name: 0, dtype: dataframe

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?