Question: 1.11 LAB: Data frames The Cars dataset has three columns giving the quality, machining angle, and machining speed of 18 cars. Write a program that

1.11 LAB: Data frames The Cars dataset has three columns giving the quality, machining angle, and machining speed of 18 cars. Write a program that performs the following tasks: Load the data Cars.csv into a data frame called cars_df. Subset the first userNum rows of the data frame into a new data frame. Find and print the maximum values of each column in the subset. Ex: If the input is: 5 the output is: Quality 5 Speed 4 Angle 3 dtype:

This is mine

#importing pandas import pandas as pd # reading the csv file cars_df = pd.DataFrame("Cars.csv") #cars.csv is not provided, using random data # getting user input userNum = int(input()) # subset the data cars_df_subset=cars_df[:userNum] # print maximum values of each column in subset print(cars_df_subset.max())

please fix my python and answer this question

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!