data analysis with python coursera final exam answers

Final Exam

1. What does csvfile stand for?

  • comma separated values
  • car seller values

2. What Python library is used forfast array processing?

  • Scikit-learn
  • Numpy
  • Matplotlib

3. What is the file path?

  • The file path tells us where the data is stored.
  • The way data is encoded.

4. What does the head() method return?

  • It returns the data types of each column
  • It returns the last five rows
  • It returns the first five rows

5. The Pandas library allows us to read what?

  • Only rows
  • Various datasets into a data frame
  • Only headers

6. The Pandas library is mostly used for what?

  • Machine learning
  • Data analysis
  • Data visualization

7. What would return the first 10 rows of dataframe df?

  • df.tail()
  • df.tail(10)
  • df.head(10)

8. What is the function used to remove rows and columns with Null or NaN values?

  • replacena()
  • removena()
  • dropna()

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

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

  • A: It multiplies each element in the column df[“a”] by 2
  • It assigns 2*df[“a”] back to column df[“a”]
  • It multiplies each element in the column df[“a”] by 2 and assigns it back to column df[“a”]

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 max-min method
  • It gives an example of the z-score or standard score

11. What is it called when you subtract the mean and divide by the standard deviation?

  • One-hot encoding
  • Min-max method
  • Data standardization

12. What segment of code calculates the mean of the column ‘peak-rpm’?

  • mean( df[‘peak-rpm’])
  • df[‘peak-rpm’].mean()
  • df.mean([‘peak-rpm’])

Leave a Reply