Data Analysis with Python -> week 5 -> Graded Quiz: Model Refinement



What type of file allows data to be saved in a tabular format?


html

csv

pdf


2.What Python library is used forstatistical modelling including regression and classification?

Numpy

Scikit-learn

Matplotlib


3.In order to read any data using Python Pandas package what are the 2 most important factors?

File types and format

Format and file path

Encoding scheme and file path


4.What does the tail() method return?

It returns the first five rows

It returns the data types of each column

It returns the last five rows


5.According to this course datasets can be stored where?

Sometimes online or server

Server or local machine

local machine or sometimes online


6. The Pandas library is mostly used for what?

Machine learning

Data analysis

Data visualization


7.How would you check the bottom 10 rows of dataframe df?

df.head()

df.tail()

df.tail(10)


8. What does the following code segment perform in a dataframe?

df.dropna(subset=["price"], axis=0, inplace = True) 


It drops all of the rows in the column "normalized-losses"

It replaces the missing values in the column "normalized-losses" with the mean of that column

Drops missing values in the price column only


9.How would you multiply each element in the column df["a"] by 2 and assign it back to the column df["a"]?

2*df["a"] 

df["a"]=2*df["a"] 

df["a"]=df["a"]-1 



10. What does the below code segment give an example of for the column “length”?

df["length"] = (df["length"]-df["length"].mean())/df["length"].std()


It gives an example of the z-score or standard score

It gives an example of the max-min method


11. What does the below code segment give an example of for the column “length”?

df["length"] = (df["length"]-df["length"].min())/ (df["length"].max()-df["length"].min())

It gives an example of the max-min method

It gives an example of the z-score or standard score



12.Why is the below table an example of One-hot encoding?




Because it transformed the column fuel into quantitative variables


Because it transformed the column fuel into a standard deviation


13. What task does the following line of code perform?

df['peak-rpm'].replace(np.nan, 5,inplace=True) 


rename the column 'peak-rpm' to 5

add 5 to the dataframe df

replace the not a number values with 5 in the column 'peak-rpm'


14. What does the following code segment perform in a dataframe?

mean = df["normalized-losses"].mean() df["normalized-losses"].replace(np.nan, mean)

It replaces the missing values in the column "normalized-losses" with the mean of that column


It drops all of the rows in the column "normalized-losses"


It drops rows that contain missing values









Comments

Popular posts from this blog