Variable Types
Output or Error
Numpy Methods
Tables
100

What kind of variable is this "1"?      

String

100

destination = make_array('Boston', 'Los Angeles', 'London', 'Beijing', 'Sydney')

np.random.choice(destination)

What is any of those locations (Boston', 'Los Angeles', 'London', 'Beijing', 'Sydney')

100

Explain np.unique

It removes duplicates and returns the values in a sorted order

100

DropNa

Deletes the rows with missing values

200

pi = 3.1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 5058223172 5359408128 4811174502 8410270193 8521105559 6446229489 5493038196 4428810975 6659334461 2847564823 3786783165 2712019091 4564856692 3460348610 4543266482

Float

200

destination = make_array('Boston', 'Los Angeles', 'London', 'Beijing', 'Sydney')

np.random.choice(destnation)

Error

200

np.arange(1,21,2)

Explain the first, second, and last position in the arange function and tell me what it does. 

first position is a starting point, middle: final number excluding the one written, and end: how many the list increases by. 

200

What is .column used for and what does it do

.column calls all the values in the column allowing you to use other functions like .mean and 5 number summary if made

300

67

Integer

Heheheheheheheheheeee

300

eight_destinations = make_array('Los Angeles', 'Boston', 'Sydney', 'Beijing', 'Sydney', 'London', 'Boston', 'London' )

number_London = np.count_nonzero(eight_destinations== 'London') number_London

2

300

.where

The dataset comes before and you select the column first then the value you want

300

.take/indexing 

This lets you call a value by its position through the column and row. 

400

Am_i_a_duck = True


Boolean

400

def pizza_price(pizza):

    if pizza == 'cheese':

        return 10

    elif pizza == 'veggie':

        return 12  

    elif pizza == 'pepperoni':

        return 13

    else: 

        return 15

plain_price = pizza_price('cheese')

plain_price

10

400

.num_rows

Counts the number of rows in the dataset

400

What does descending=True mean?

It will make your Data move from largest to smallest based off of the column in the dataset you call.

500

Hi = []

Array

500

what is the output 3 == 1

False

500

.append

It will add the 2 datasets together. 

500

What function is descending/ascending = True used on?

.where and .sort

M
e
n
u