{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Introduction To The Data Set" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import numpy as np\n", "\n", "pd.options.display.max_columns = 99" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "cols = ['symboling', 'normalized-losses', 'make', 'fuel-type', 'aspiration', 'num-of-doors', 'body-style', \n", " 'drive-wheels', 'engine-location', 'wheel-base', 'length', 'width', 'height', 'curb-weight', 'engine-type', \n", " 'num-of-cylinders', 'engine-size', 'fuel-system', 'bore', 'stroke', 'compression-rate', 'horsepower', 'peak-rpm', 'city-mpg', 'highway-mpg', 'price']\n", "cars = pd.read_csv('imports-85.data', names=cols)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "scrolled": true }, "outputs": [ { "data": { "text/html": [ "
\n", " | symboling | \n", "normalized-losses | \n", "make | \n", "fuel-type | \n", "aspiration | \n", "num-of-doors | \n", "body-style | \n", "drive-wheels | \n", "engine-location | \n", "wheel-base | \n", "length | \n", "width | \n", "height | \n", "curb-weight | \n", "engine-type | \n", "num-of-cylinders | \n", "engine-size | \n", "fuel-system | \n", "bore | \n", "stroke | \n", "compression-rate | \n", "horsepower | \n", "peak-rpm | \n", "city-mpg | \n", "highway-mpg | \n", "price | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "3 | \n", "? | \n", "alfa-romero | \n", "gas | \n", "std | \n", "two | \n", "convertible | \n", "rwd | \n", "front | \n", "88.6 | \n", "168.8 | \n", "64.1 | \n", "48.8 | \n", "2548 | \n", "dohc | \n", "four | \n", "130 | \n", "mpfi | \n", "3.47 | \n", "2.68 | \n", "9.0 | \n", "111 | \n", "5000 | \n", "21 | \n", "27 | \n", "13495 | \n", "
1 | \n", "3 | \n", "? | \n", "alfa-romero | \n", "gas | \n", "std | \n", "two | \n", "convertible | \n", "rwd | \n", "front | \n", "88.6 | \n", "168.8 | \n", "64.1 | \n", "48.8 | \n", "2548 | \n", "dohc | \n", "four | \n", "130 | \n", "mpfi | \n", "3.47 | \n", "2.68 | \n", "9.0 | \n", "111 | \n", "5000 | \n", "21 | \n", "27 | \n", "16500 | \n", "
2 | \n", "1 | \n", "? | \n", "alfa-romero | \n", "gas | \n", "std | \n", "two | \n", "hatchback | \n", "rwd | \n", "front | \n", "94.5 | \n", "171.2 | \n", "65.5 | \n", "52.4 | \n", "2823 | \n", "ohcv | \n", "six | \n", "152 | \n", "mpfi | \n", "2.68 | \n", "3.47 | \n", "9.0 | \n", "154 | \n", "5000 | \n", "19 | \n", "26 | \n", "16500 | \n", "
3 | \n", "2 | \n", "164 | \n", "audi | \n", "gas | \n", "std | \n", "four | \n", "sedan | \n", "fwd | \n", "front | \n", "99.8 | \n", "176.6 | \n", "66.2 | \n", "54.3 | \n", "2337 | \n", "ohc | \n", "four | \n", "109 | \n", "mpfi | \n", "3.19 | \n", "3.40 | \n", "10.0 | \n", "102 | \n", "5500 | \n", "24 | \n", "30 | \n", "13950 | \n", "
4 | \n", "2 | \n", "164 | \n", "audi | \n", "gas | \n", "std | \n", "four | \n", "sedan | \n", "4wd | \n", "front | \n", "99.4 | \n", "176.6 | \n", "66.4 | \n", "54.3 | \n", "2824 | \n", "ohc | \n", "five | \n", "136 | \n", "mpfi | \n", "3.19 | \n", "3.40 | \n", "8.0 | \n", "115 | \n", "5500 | \n", "18 | \n", "22 | \n", "17450 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
200 | \n", "-1 | \n", "95 | \n", "volvo | \n", "gas | \n", "std | \n", "four | \n", "sedan | \n", "rwd | \n", "front | \n", "109.1 | \n", "188.8 | \n", "68.9 | \n", "55.5 | \n", "2952 | \n", "ohc | \n", "four | \n", "141 | \n", "mpfi | \n", "3.78 | \n", "3.15 | \n", "9.5 | \n", "114 | \n", "5400 | \n", "23 | \n", "28 | \n", "16845 | \n", "
201 | \n", "-1 | \n", "95 | \n", "volvo | \n", "gas | \n", "turbo | \n", "four | \n", "sedan | \n", "rwd | \n", "front | \n", "109.1 | \n", "188.8 | \n", "68.8 | \n", "55.5 | \n", "3049 | \n", "ohc | \n", "four | \n", "141 | \n", "mpfi | \n", "3.78 | \n", "3.15 | \n", "8.7 | \n", "160 | \n", "5300 | \n", "19 | \n", "25 | \n", "19045 | \n", "
202 | \n", "-1 | \n", "95 | \n", "volvo | \n", "gas | \n", "std | \n", "four | \n", "sedan | \n", "rwd | \n", "front | \n", "109.1 | \n", "188.8 | \n", "68.9 | \n", "55.5 | \n", "3012 | \n", "ohcv | \n", "six | \n", "173 | \n", "mpfi | \n", "3.58 | \n", "2.87 | \n", "8.8 | \n", "134 | \n", "5500 | \n", "18 | \n", "23 | \n", "21485 | \n", "
203 | \n", "-1 | \n", "95 | \n", "volvo | \n", "diesel | \n", "turbo | \n", "four | \n", "sedan | \n", "rwd | \n", "front | \n", "109.1 | \n", "188.8 | \n", "68.9 | \n", "55.5 | \n", "3217 | \n", "ohc | \n", "six | \n", "145 | \n", "idi | \n", "3.01 | \n", "3.40 | \n", "23.0 | \n", "106 | \n", "4800 | \n", "26 | \n", "27 | \n", "22470 | \n", "
204 | \n", "-1 | \n", "95 | \n", "volvo | \n", "gas | \n", "turbo | \n", "four | \n", "sedan | \n", "rwd | \n", "front | \n", "109.1 | \n", "188.8 | \n", "68.9 | \n", "55.5 | \n", "3062 | \n", "ohc | \n", "four | \n", "141 | \n", "mpfi | \n", "3.78 | \n", "3.15 | \n", "9.5 | \n", "114 | \n", "5400 | \n", "19 | \n", "25 | \n", "22625 | \n", "
205 rows × 26 columns
\n", "\n", " | normalized-losses | \n", "wheel-base | \n", "length | \n", "width | \n", "height | \n", "curb-weight | \n", "bore | \n", "stroke | \n", "compression-rate | \n", "horsepower | \n", "peak-rpm | \n", "city-mpg | \n", "highway-mpg | \n", "price | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "? | \n", "88.6 | \n", "168.8 | \n", "64.1 | \n", "48.8 | \n", "2548 | \n", "3.47 | \n", "2.68 | \n", "9.0 | \n", "111 | \n", "5000 | \n", "21 | \n", "27 | \n", "13495 | \n", "
1 | \n", "? | \n", "88.6 | \n", "168.8 | \n", "64.1 | \n", "48.8 | \n", "2548 | \n", "3.47 | \n", "2.68 | \n", "9.0 | \n", "111 | \n", "5000 | \n", "21 | \n", "27 | \n", "16500 | \n", "
2 | \n", "? | \n", "94.5 | \n", "171.2 | \n", "65.5 | \n", "52.4 | \n", "2823 | \n", "2.68 | \n", "3.47 | \n", "9.0 | \n", "154 | \n", "5000 | \n", "19 | \n", "26 | \n", "16500 | \n", "
3 | \n", "164 | \n", "99.8 | \n", "176.6 | \n", "66.2 | \n", "54.3 | \n", "2337 | \n", "3.19 | \n", "3.40 | \n", "10.0 | \n", "102 | \n", "5500 | \n", "24 | \n", "30 | \n", "13950 | \n", "
4 | \n", "164 | \n", "99.4 | \n", "176.6 | \n", "66.4 | \n", "54.3 | \n", "2824 | \n", "3.19 | \n", "3.40 | \n", "8.0 | \n", "115 | \n", "5500 | \n", "18 | \n", "22 | \n", "17450 | \n", "
\n", " | normalized-losses | \n", "wheel-base | \n", "length | \n", "width | \n", "height | \n", "curb-weight | \n", "bore | \n", "stroke | \n", "compression-rate | \n", "horsepower | \n", "peak-rpm | \n", "city-mpg | \n", "highway-mpg | \n", "price | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "NaN | \n", "88.6 | \n", "168.8 | \n", "64.1 | \n", "48.8 | \n", "2548 | \n", "3.47 | \n", "2.68 | \n", "9.0 | \n", "111 | \n", "5000 | \n", "21 | \n", "27 | \n", "13495 | \n", "
1 | \n", "NaN | \n", "88.6 | \n", "168.8 | \n", "64.1 | \n", "48.8 | \n", "2548 | \n", "3.47 | \n", "2.68 | \n", "9.0 | \n", "111 | \n", "5000 | \n", "21 | \n", "27 | \n", "16500 | \n", "
2 | \n", "NaN | \n", "94.5 | \n", "171.2 | \n", "65.5 | \n", "52.4 | \n", "2823 | \n", "2.68 | \n", "3.47 | \n", "9.0 | \n", "154 | \n", "5000 | \n", "19 | \n", "26 | \n", "16500 | \n", "
3 | \n", "164 | \n", "99.8 | \n", "176.6 | \n", "66.2 | \n", "54.3 | \n", "2337 | \n", "3.19 | \n", "3.40 | \n", "10.0 | \n", "102 | \n", "5500 | \n", "24 | \n", "30 | \n", "13950 | \n", "
4 | \n", "164 | \n", "99.4 | \n", "176.6 | \n", "66.4 | \n", "54.3 | \n", "2824 | \n", "3.19 | \n", "3.40 | \n", "8.0 | \n", "115 | \n", "5500 | \n", "18 | \n", "22 | \n", "17450 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
200 | \n", "95 | \n", "109.1 | \n", "188.8 | \n", "68.9 | \n", "55.5 | \n", "2952 | \n", "3.78 | \n", "3.15 | \n", "9.5 | \n", "114 | \n", "5400 | \n", "23 | \n", "28 | \n", "16845 | \n", "
201 | \n", "95 | \n", "109.1 | \n", "188.8 | \n", "68.8 | \n", "55.5 | \n", "3049 | \n", "3.78 | \n", "3.15 | \n", "8.7 | \n", "160 | \n", "5300 | \n", "19 | \n", "25 | \n", "19045 | \n", "
202 | \n", "95 | \n", "109.1 | \n", "188.8 | \n", "68.9 | \n", "55.5 | \n", "3012 | \n", "3.58 | \n", "2.87 | \n", "8.8 | \n", "134 | \n", "5500 | \n", "18 | \n", "23 | \n", "21485 | \n", "
203 | \n", "95 | \n", "109.1 | \n", "188.8 | \n", "68.9 | \n", "55.5 | \n", "3217 | \n", "3.01 | \n", "3.40 | \n", "23.0 | \n", "106 | \n", "4800 | \n", "26 | \n", "27 | \n", "22470 | \n", "
204 | \n", "95 | \n", "109.1 | \n", "188.8 | \n", "68.9 | \n", "55.5 | \n", "3062 | \n", "3.78 | \n", "3.15 | \n", "9.5 | \n", "114 | \n", "5400 | \n", "19 | \n", "25 | \n", "22625 | \n", "
205 rows × 14 columns
\n", "