0% found this document useful (0 votes)
31 views

Assignment+questions+python+fundmentals ANSWER

The document discusses a car dataset assignment which involves analyzing features of 428 cars such as horsepower, cylinders, price, and more. Tasks include finding basic statistics, creating subsets, and categorizing cars by price.

Uploaded by

Leonardo Reyes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
0% found this document useful (0 votes)
31 views

Assignment+questions+python+fundmentals ANSWER

The document discusses a car dataset assignment which involves analyzing features of 428 cars such as horsepower, cylinders, price, and more. Tasks include finding basic statistics, creating subsets, and categorizing cars by price.

Uploaded by

Leonardo Reyes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
You are on page 1/ 3

Welcome to our first assignment.

Please open a new Python script and call it "section 4 assignment"

in this assignment, we will work on the car's data set. it has the features of 400 cars from
horsepower to speed and price.

Part 1:

1- How many Rows are in the cars dataset?

There are 428 rows

2- How many Columns are in the car's data set?

There are 19 columns

3- How many unique numbers of cylinders we have in the cars dataset?

There are 8 unique number

4- what is the average horsepower of cars?

Mean horsepower 215

5- what is the maximum horsepower?

Maximum horsepower 500

6- what is the most expensive car?

Is 192465

7- change the name of the column "name" to "car name"


part 2:

8- make a subset of the data that has the car name, the price and name the new sub-setted data
frame  car pricing.

9- create a function called pricing category that returns "Budget Car " if the cars are less than
20,000 USD," Suitable Car " is the car is more than 20,000 and less than 35 000 and finally an
expensive car for cars more than 35000. 

10- create a column named category on the subset using a for loop and pricing category function.
11- How many Budget cars, suitable cars, and expensive cars we have?

As always, please first try to answer on your own and then have a look at the solved
script(attached).

All the best,

Haytham

Rescale analytics

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy