Overview

This is a dataset about cars and how much fuel they use.

Explore Structure




Index Type Example Value
0 dict { }
... ... ...
Key Type Example Value Comment
"Engine Information" dict { }
"Identification" dict { }
"Dimensions" dict { }
"Fuel Information" dict { }
Key Type Example Value Comment
"Highway mpg" int 25 The miles-per-gallon this car gets on average on highways.
"Fuel Type" str "Gasoline" Whether this car takes "Gasoline", "Diesel fuel", "Electricity", "Compressed natural gas", or "E85" (a term that refers to high-level ethanol-gasoline blends containing 51%-83% ethanol). If it is unknown, it is left blank.
"City mpg" int 18 The miles-per-gallon this car gets on average in cities.
Key Type Example Value Comment
"Make" str "Audi" The maker for this car.
"Model Year" str "2009 Audi A3" The specific name/year for this car.
"ID" str "2009 Audi A3 3.2" A unique ID for this particular car, using the year, make, model, and transmission type.
"Classification" str "Automatic transmission" Whether this is a "Manual transmission" or an "Automatic transmission". If it is unknown, it is left blank.
"Year" int 2009 The year that this car was released.
Key Type Example Value Comment
"Width" int 202 Unknown values are stored as 0. Unfortunately, many cars do not report this data.
"Length" int 143 Unknown values are stored as 0. Unfortunately, many cars do not report this data.
"Height" int 140 Unknown values are stored as 0. Unfortunately, many cars do not report this data.
Key Type Example Value Comment
"Transmission" str "6 Speed Automatic Select Shift" The full name of this type of transmission, based on its Classification and number of forward gears.
"Engine Type" str "Audi 3.2L 6 cylinder 250hp 236ft-lbs" How many cylinders are in this engine. Most cars are either a 6-cylinder or an 8-cylinder.
"Engine Statistics" dict { }
"Hybrid" bool False Whether this is a hybrid engine or not - that is, if it uses both an internal combustion engine and an electric motor.
"Number of Forward Gears" int 6 The number of forward gears. If no information is available, it is coded as 0.
"Driveline" str "All-wheel drive" A string representing whether this is "Rear-wheel drive", "Front-wheel drive", or "All-wheel drive".
Key Type Example Value Comment
"Horsepower" int 250 A measure of the engine's power. A unit of power equal to 550 foot-pounds per second (745.7 watts).
"Torque" int 236 The torque of the engine, measured in lb/ft. When an engine is said to make "200 lb-ft of torque", it means that 200 pounds of force on a 1-foot lever is needed to stop its motion.

Downloads

Download all of the following files.

Usage

This library has 3 functions you can use.
import cars
list_of_car = cars.get_cars()
list_of_car = cars.get_cars_by_year(2001)
list_of_car = cars.get_cars_by_make("Pontiac")
Additionally, some of the functions can return a sample of the Big Data using an extra argument. If you use this sampled Big Data, it may be much faster. When you are sure your code is correct, you can remove the argument to use the full dataset.
import cars
# These may be slow!
list_of_car = cars.get_cars(test=True)
list_of_car = cars.get_cars_by_year(2001, test=True)
list_of_car = cars.get_cars_by_make("Pontiac", test=True)

Documentation

 cars.get_cars(test=False)

Returns the complete list of cars.

 cars.get_cars_by_year(year, test=False)

Returns all the cars for a given year.

 cars.get_cars_by_make(make, test=False)

Returns all the cars of a certain make.