Question: Data frames can be subset by a chosen value using = = . Ex: df [ df . x = = 5 ] gives all
Data frames can be subset by a chosen value using
Ex: dfdfx gives all the rows in the data frame df for which the column x has a value of
Write a program that performs the following tasks:
Load the file mtcars.csv into a data frame called df
Create a new data frame dfcyl by subsetting the data frame based on a user defined value for the column cyl
Print the shape of the new data frame.
Ex: If the input is:
the output is:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
