This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Answer the following questions to check your learning.
You have a NumPy array with the shape (2,20). What does this tell you about the elements in the array?
The array is two dimensional, consisting of two arrays each with 20 elements
The array contains 2 elements, with the values 2 and 20
The array contains 20 elements, all with the value 2
You have a Pandas DataFrame named df_sales containing daily sales data. The DataFrame contains the following columns: year, month, day_of_month, sales_total. You want to find the average sales_total value. Which code should you use?
df_sales['sales_total'].avg()
df_sales['sales_total'].mean()
mean(df_sales['sales_total'])
You have a DataFrame containing data about daily ice cream sales. You use the corr method to compare the avg_temp and units_sold columns, and get a result of 0.97. What does this result indicate?
On the day with the maximum units_sold value, the avg_temp value was 0.97
Days with high avg_temp values tend to coincide with days that have high units_sold values
The units_sold value is, on average, 97% of the avg_temp value
You must answer all questions before checking your work.
Was this page helpful?