Achieve 80% to pass. Wherever necessary, you are free to check the documentation of the Python packages when answering the questions.

 

  1. What is a DataFrame in pandas?
    1. A type of function
    2. A type of data structure that represents a table of data
    3. A type of data structure that represents numerical data of arbitrary dimensions
    4. A type of plot

 

 

  1. Consider the following pandas dataframe.

The above pandas dataframe is stored as df. What is the output of df.iloc[2,1]?

  1. 2023-07-03
  2. 2023-07-02
  3. 30.9
  4. 32.4

 

 

  1. Consider the pandas dataframe in question 2, which of the following pairs of commands produce the same output?
    1. df.iloc[2,1] and df.loc[2,1]
    2. df.iloc[0,1] and df.loc['Date','Temperature (degC)']
    3. df.iloc[1,0] and df.loc[1,'Date']
    4. df.iloc[3,1] and df.loc[3,'Date']

 

 

  1. Consider the pandas dataframe in question 2, which of the following is(are) the correct commands to calculate the average temperature?
    1. df['Temperature (degC)'].mean(axis=1)
    2. df['Temperature (degC)'].mean(axis=0)
    3. df['Temperature (degC)'].average(axis=1)
    4. df['Temperature (degC)'].average(axis=0)

 

 

  1. How do you convert a string to a datetime in pandas?
    1. Use the .to_datetime()
    2. Use the .strftime()
    3. Use the .datetime()
    4. Use the .split()

 

 

  1. What is the purpose of the .strftime() in pandas?
    1. To convert a datetime to a string with a specified format
    2. To convert a string to a datetime with a specified format
    3. To extract the hour, minute, or second from a datetime
    4. None of the above

 

 

  1. What is the difference between .contour() and .tricontour()?
    1. .contour() is used to plot contours for gridded data, while .tricontour() is used to plot contours for unstructured data
    2. .contour() is used to plot contours for unstructured data, while .tricontour() is used to plot contours for gridded data
    3. .contour() is used to plot contours for 2D data on a 2D plane, while .tricontour() is used to plot contours for 3D data on a 2D plane.
    4. .contour() is a function in matplotlib, while .tricontour() is not a function in matplotlib.

 

 

  1. What is interpolation?
    1. A method for smoothing out noisy data
    2. A method to calculate new data points outside of the known data range
    3. A method of estimation to construct new data points based on a set of given data points
    4. A method to mask out invalid or unwanted data points

 

 

  1. Which of the following statements is true regarding barycentric interpolation?
    1. Barycentric interpolation estimates a new data point by fitting a straight line between adjacent data points
    2. Barycentric interpolation estimates a new data point by fitting a piecewise polynomial function based on the known data points
    3. Barycentric interpolation uses barycentric weights to estimate a data point
    4. Barycentric interpolation cannot be used on gridded data

 

 

  1. What values can the Anomaly Correlation Coefficient (ACC) take?
    1. Only -1, 0, or 1
    2. Any positive value between 0 and 1
    3. Any negative value between -1 and 0
    4. Any value between -1 and 1

 

Previous   Next week