Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started