price int64 500 54.2k | year float64 1.99k 2.02k | manufacturer stringclasses 43
values | condition stringclasses 7
values | cylinders float64 3 12 | fuel stringclasses 6
values | odometer float64 0 400k | title_status stringclasses 7
values | transmission stringclasses 4
values | drive stringclasses 4
values | type stringclasses 14
values | paint_color stringclasses 13
values | state stringclasses 51
values | car_age int64 4 36 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
33,590 | 2,014 | gmc | good | 8 | gas | 57,923 | clean | other | unknown | pickup | white | al | 12 |
22,590 | 2,010 | chevrolet | good | 8 | gas | 71,229 | clean | other | unknown | pickup | blue | al | 16 |
39,590 | 2,020 | chevrolet | good | 8 | gas | 19,160 | clean | other | unknown | pickup | red | al | 6 |
30,990 | 2,017 | toyota | good | 8 | gas | 41,124 | clean | other | unknown | pickup | red | al | 9 |
15,000 | 2,013 | ford | excellent | 6 | gas | 128,000 | clean | automatic | rwd | truck | black | al | 13 |
27,990 | 2,012 | gmc | good | 8 | gas | 68,696 | clean | other | 4wd | pickup | black | al | 14 |
34,590 | 2,016 | chevrolet | good | 6 | gas | 29,499 | clean | other | 4wd | pickup | silver | al | 10 |
35,000 | 2,019 | toyota | excellent | 6 | gas | 43,000 | clean | automatic | 4wd | truck | grey | al | 7 |
29,990 | 2,016 | chevrolet | good | 6 | gas | 17,302 | clean | other | 4wd | pickup | red | al | 10 |
38,590 | 2,011 | chevrolet | good | 8 | gas | 30,237 | clean | other | rwd | other | red | al | 15 |
4,500 | 1,992 | jeep | excellent | 6 | gas | 192,000 | clean | automatic | 4wd | unknown | unknown | al | 34 |
32,990 | 2,017 | jeep | good | 6 | gas | 30,041 | clean | other | 4wd | other | silver | al | 9 |
24,590 | 2,017 | chevrolet | good | 6 | gas | 40,784 | clean | other | unknown | pickup | white | al | 9 |
30,990 | 2,016 | chevrolet | good | 6 | other | 34,940 | clean | other | 4wd | pickup | blue | al | 10 |
27,990 | 2,014 | toyota | good | 6 | other | 17,805 | clean | other | unknown | pickup | red | al | 12 |
37,990 | 2,016 | chevrolet | good | 8 | gas | 9,704 | clean | other | rwd | coupe | red | al | 10 |
33,590 | 2,014 | toyota | good | 8 | other | 55,251 | clean | other | unknown | pickup | red | al | 12 |
30,990 | 2,019 | ford | good | 8 | other | 1,834 | clean | other | unknown | pickup | black | al | 7 |
27,990 | 2,018 | nissan | good | 6 | gas | 37,332 | clean | other | 4wd | pickup | silver | al | 8 |
34,590 | 2,018 | ford | good | 6 | gas | 20,856 | clean | other | unknown | pickup | white | al | 8 |
30,590 | 2,016 | toyota | good | 6 | other | 30,176 | clean | other | unknown | pickup | red | al | 10 |
32,990 | 2,020 | jeep | good | 6 | gas | 20,581 | clean | other | 4wd | SUV | silver | al | 6 |
38,990 | 2,020 | ford | good | 6 | gas | 12,231 | clean | other | unknown | pickup | unknown | al | 6 |
22,590 | 2,017 | ram | good | 8 | gas | 39,508 | clean | other | unknown | pickup | white | al | 9 |
31,590 | 2,020 | mazda | good | 4 | gas | 2,195 | clean | other | rwd | other | unknown | al | 6 |
27,990 | 2,020 | ford | good | 8 | gas | 10,688 | clean | other | unknown | pickup | white | al | 6 |
31,590 | 2,019 | cadillac | good | 6 | other | 12,102 | clean | other | fwd | hatchback | black | al | 7 |
19,900 | 2,004 | ford | good | 8 | diesel | 88,000 | clean | automatic | 4wd | pickup | blue | al | 22 |
16,590 | 2,016 | jeep | good | 4 | gas | 35,835 | clean | other | 4wd | other | red | al | 10 |
26,990 | 2,016 | ford | good | 6 | gas | 14,230 | clean | other | unknown | pickup | black | al | 10 |
25,590 | 2,015 | gmc | good | 6 | other | 35,290 | clean | other | unknown | pickup | white | al | 11 |
14,000 | 2,012 | honda | excellent | 6 | gas | 95,000 | clean | automatic | fwd | mini-van | silver | al | 14 |
28,590 | 2,018 | ram | good | 6 | other | 30,047 | clean | other | unknown | pickup | white | al | 8 |
24,590 | 2,013 | gmc | good | 8 | other | 80,318 | clean | other | unknown | pickup | unknown | al | 13 |
25,990 | 2,019 | ram | good | 8 | gas | 12,302 | clean | other | unknown | pickup | white | al | 7 |
34,990 | 2,018 | ford | good | 8 | gas | 18,650 | clean | other | rwd | other | black | al | 8 |
27,990 | 2,017 | chevrolet | good | 6 | gas | 22,120 | clean | other | unknown | pickup | unknown | al | 9 |
22,500 | 2,001 | ford | good | 8 | diesel | 144,700 | clean | manual | rwd | truck | white | al | 25 |
32,990 | 2,019 | chevrolet | good | 8 | other | 6,897 | clean | other | unknown | pickup | black | al | 7 |
31,990 | 2,013 | toyota | good | 8 | gas | 55,068 | clean | other | 4wd | pickup | unknown | al | 13 |
29,990 | 2,014 | chevrolet | good | 8 | gas | 26,129 | clean | other | 4wd | pickup | brown | al | 12 |
23,990 | 2,016 | chevrolet | good | 6 | gas | 41,568 | clean | other | unknown | pickup | white | al | 10 |
22,990 | 2,012 | toyota | good | 6 | gas | 37,725 | clean | other | unknown | pickup | white | al | 14 |
26,990 | 2,014 | chevrolet | good | 6 | gas | 63,129 | clean | automatic | unknown | pickup | black | al | 12 |
33,990 | 2,017 | jeep | good | 6 | other | 34,152 | clean | other | 4wd | SUV | white | al | 9 |
15,000 | 2,017 | dodge | excellent | 8 | gas | 90,000 | rebuilt | automatic | rwd | sedan | grey | al | 9 |
26,590 | 2,020 | honda | good | 4 | gas | 9,954 | clean | other | fwd | coupe | silver | al | 6 |
18,590 | 2,018 | honda | good | 4 | gas | 28,942 | clean | other | fwd | sedan | white | al | 8 |
29,590 | 2,017 | ford | good | 6 | gas | 70,760 | clean | other | 4wd | SUV | blue | al | 9 |
21,590 | 2,018 | honda | good | 4 | gas | 7,885 | clean | other | fwd | sedan | unknown | al | 8 |
22,590 | 2,013 | ford | good | 6 | other | 14,169 | clean | other | unknown | pickup | silver | al | 13 |
33,990 | 2,020 | jeep | good | 6 | gas | 9,859 | clean | other | 4wd | other | unknown | al | 6 |
29,990 | 2,012 | toyota | good | 6 | gas | 43,182 | clean | other | 4wd | pickup | white | al | 14 |
37,590 | 2,019 | ford | good | 6 | gas | 8,663 | clean | other | unknown | pickup | unknown | al | 7 |
25,990 | 2,015 | lexus | good | 6 | other | 55,783 | clean | other | unknown | hatchback | white | al | 11 |
32,990 | 2,018 | jaguar | good | 6 | other | 26,685 | clean | other | unknown | other | white | al | 8 |
28,990 | 2,020 | buick | good | 6 | gas | 21 | clean | other | unknown | other | white | al | 6 |
34,990 | 2,020 | lexus | good | 6 | gas | 1,722 | clean | other | fwd | hatchback | black | al | 6 |
3,000 | 2,004 | chrysler | good | 6 | gas | 176,144 | clean | automatic | fwd | mini-van | silver | al | 22 |
22,590 | 2,016 | volvo | good | 4 | gas | 42,755 | clean | other | unknown | sedan | unknown | al | 10 |
36,990 | 2,019 | volvo | good | 4 | gas | 8,141 | clean | other | unknown | sedan | white | al | 7 |
31,990 | 2,020 | volvo | good | 4 | gas | 16,594 | clean | other | fwd | sedan | unknown | al | 6 |
28,590 | 2,019 | volvo | good | 4 | gas | 18,531 | clean | other | fwd | sedan | black | al | 7 |
31,990 | 2,018 | audi | good | 6 | gas | 19,179 | clean | other | unknown | other | unknown | al | 8 |
19,990 | 2,015 | infiniti | good | 6 | other | 96,003 | clean | other | unknown | SUV | silver | al | 11 |
29,590 | 2,017 | lincoln | good | 6 | gas | 35,320 | clean | other | unknown | sedan | black | al | 9 |
29,990 | 2,018 | alfa-romeo | good | 4 | other | 26,978 | clean | other | unknown | hatchback | unknown | al | 8 |
2,100 | 2,006 | subaru | fair | 4 | gas | 97,000 | clean | automatic | unknown | hatchback | unknown | al | 20 |
15,990 | 2,016 | unknown | good | 4 | gas | 29,652 | clean | other | fwd | hatchback | blue | al | 10 |
20,590 | 2,013 | acura | good | 6 | gas | 77,087 | clean | other | unknown | other | silver | al | 13 |
29,590 | 2,018 | audi | good | 6 | gas | 13,035 | clean | other | fwd | sedan | unknown | al | 8 |
16,590 | 2,015 | hyundai | good | 4 | gas | 26,655 | clean | other | fwd | sedan | white | al | 11 |
33,990 | 2,017 | ram | good | 8 | gas | 17,033 | clean | other | 4wd | pickup | blue | al | 9 |
36,590 | 2,019 | gmc | good | 8 | gas | 14,222 | clean | other | 4wd | pickup | blue | al | 7 |
29,590 | 2,013 | gmc | good | 8 | gas | 37,888 | clean | other | unknown | pickup | silver | al | 13 |
40,590 | 2,019 | ford | good | 8 | other | 9,313 | clean | other | 4wd | pickup | white | al | 7 |
33,990 | 2,018 | jeep | good | 6 | gas | 34,636 | clean | other | 4wd | other | white | al | 8 |
43,990 | 2,019 | jeep | good | 6 | gas | 4,362 | clean | other | 4wd | SUV | black | al | 7 |
38,990 | 2,017 | jeep | good | 6 | gas | 20,676 | clean | other | 4wd | other | red | al | 9 |
39,590 | 2,018 | jeep | good | 6 | gas | 21,893 | clean | other | 4wd | SUV | silver | al | 8 |
9,500 | 2,003 | chrysler | excellent | 6 | gas | 30,376 | clean | automatic | fwd | mini-van | blue | al | 23 |
28,590 | 2,018 | gmc | good | 6 | gas | 20,736 | clean | other | fwd | SUV | white | al | 8 |
16,590 | 2,013 | lincoln | good | 6 | gas | 61,087 | clean | other | fwd | sedan | red | al | 13 |
28,990 | 2,017 | gmc | good | 6 | gas | 18,041 | clean | other | fwd | SUV | unknown | al | 9 |
20,590 | 2,017 | lincoln | good | 6 | gas | 36,436 | clean | other | fwd | sedan | unknown | al | 9 |
26,990 | 2,015 | lexus | good | 4 | gas | 29,738 | clean | other | fwd | hatchback | red | al | 11 |
26,990 | 2,016 | lexus | good | 4 | gas | 31,363 | clean | other | fwd | hatchback | white | al | 10 |
22,590 | 2,020 | buick | good | 6 | other | 5,144 | clean | other | unknown | SUV | red | al | 6 |
35,990 | 2,018 | jaguar | good | 6 | gas | 8,490 | clean | other | unknown | other | black | al | 8 |
17,500 | 2,008 | toyota | good | 6 | gas | 201,300 | clean | manual | 4wd | offroad | black | al | 18 |
6,000 | 2,007 | mercedes-benz | good | 6 | diesel | 124,000 | clean | automatic | rwd | sedan | blue | al | 19 |
25,990 | 2,018 | volvo | good | 4 | diesel | 22,834 | clean | other | unknown | sedan | unknown | al | 8 |
6,800 | 2,005 | unknown | excellent | 6 | diesel | 180,000 | clean | automatic | rwd | bus | yellow | al | 21 |
36,590 | 2,019 | volvo | good | 4 | gas | 7,618 | clean | other | unknown | sedan | white | al | 7 |
35,990 | 2,019 | volvo | good | 4 | other | 15,567 | clean | other | unknown | sedan | red | al | 7 |
33,590 | 2,019 | volvo | good | 4 | gas | 10,742 | clean | other | unknown | sedan | silver | al | 7 |
38,990 | 2,020 | infiniti | good | 6 | gas | 5,279 | clean | other | fwd | other | black | al | 6 |
33,990 | 2,018 | alfa-romeo | good | 4 | gas | 23,753 | clean | other | unknown | hatchback | unknown | al | 8 |
27,990 | 2,017 | lincoln | good | 6 | gas | 19,492 | clean | automatic | unknown | sedan | unknown | al | 9 |
28,590 | 2,018 | audi | good | 6 | gas | 31,033 | clean | other | unknown | SUV | silver | al | 8 |
Craigslist Used Cars and Trucks: EDA
Overview
This dataset and notebook contain an Exploratory Data Analysis (EDA) of real Craigslist used-car listings scraped across the United States.
Main Question: What factors most influence the price of a used car listed on Craigslist?
Target Variable: price — the seller's asking price for each vehicle listing.
About the Dataset
| Property | Details |
|---|---|
| Source | Kaggle — Austin Reese (scraped from Craigslist) |
| Original Size | ~426,000 rows x 26 columns |
| Content | Used car and truck listings across the United States |
| Target Variable | price — the asking price of the vehicle |
Features include: year, manufacturer, condition, cylinders, fuel, odometer, transmission, drive, type, paint_color, state, and more.
Repository Contents
| File | Description |
|---|---|
vehicles_clean.csv |
Cleaned dataset after all preprocessing steps |
Craigslist_Used_Cars_EDA_Final.ipynb |
Full EDA notebook (Google Colab) |
README.md |
This file |
presentation.mp4 |
2-3 minute video walkthrough |
Part 1: Data Cleaning
Raw Craigslist data required substantial cleaning. Rather than a single blanket strategy, we matched each column to the approach that fits it best.
Columns Dropped
The following columns were removed as they add no value to price analysis:
| Column | Reason |
|---|---|
url, region_url, image_url |
Links, not useful for analysis |
description |
Free-text field, too complex to analyze in this EDA |
VIN |
Unique per car, no predictive signal |
county |
Almost entirely empty |
posting_date |
Not in scope for this analysis |
region |
Replaced by state for geographic analysis |
lat, long |
Geographic coordinates, redundant with state |
Two columns (id and model) were kept temporarily through the relevant cleaning steps and dropped only once their job was done: id protected against false duplicates during deduplication, and model enabled the manufacturer recovery described below.
Missing Values Strategy
| Strategy | Applied To |
|---|---|
| Drop column (>50% missing) | Columns with more than half their values missing |
| Drop row | Rows missing price, year, or odometer |
| Smart Manufacturer Recovery | Use model to recover missing manufacturers before falling back to unknown |
| Smart Cylinder Recovery | Fill missing cylinder values by (manufacturer, model) first, then (manufacturer, year), then manufacturer, then median |
| Generic median fallback | Safety net for any remaining numeric NaNs |
Smart Manufacturer Recovery
Filling every missing manufacturer with unknown would create a large fake brand that pollutes later analysis. Instead, we build a lookup from rows where both model and manufacturer are present, then use it to recover manufacturers when only the model is known. For example, a listing with model = civic becomes a Honda; model = f-150 becomes a Ford. Only rows missing both fields fall back to unknown.
The model column is kept alive for now because it is also used in the Smart Cylinder Recovery step below.
Smart Cylinder Recovery
The cylinders column is filled in four passes, from most specific to least specific:
- Most common cylinder count for each
(manufacturer, model)pair — the most reliable match, since a given model is very consistent on cylinders regardless of year. - Most common cylinder count for each
(manufacturer, year)pair, for rows still missing. - Most common cylinder count for the manufacturer alone, as a further fallback.
- Overall median, as a final safety net.
This hierarchy produces much more realistic values than a single dataset-wide median. After this step, the model column has finished its job (helping recover both manufacturer and cylinders) and is dropped.
Unrealistic Value Filters
| Column | Filter | Reasoning |
|---|---|---|
price |
500 to 150,000 dollars | Removes free and erroneous listings while preserving legitimate budget and luxury markets |
year |
1990 to 2026 | Realistic range of used cars in active circulation |
odometer |
Less than 400,000 miles | Above 400K is almost certainly a data entry error |
Smart Duplicate Detection
Because we dropped id and VIN, the default duplicate check could incorrectly merge two genuinely different listings. We keep id through the dedup step, then identify re-posts by matching across nine content fields: price, year, manufacturer, odometer, state, condition, cylinders, fuel, paint_color. Matching all nine by coincidence is implausible, so we treat such pairs as the same car posted twice. id is dropped right after this step.
Outlier Detection
After the unrealistic-value filter, we apply IQR-based outlier removal to price:
- Lower bound = Q1 - 1.5 × IQR
- Upper bound = Q3 + 1.5 × IQR
Before/after box plots confirm the distribution becomes much cleaner.
Feature Engineering
A new column car_age was created from the year column:
car_age = 2026 - year
Part 2: Research Questions and Visualizations
Guiding question: What factors determine the price of a used car on Craigslist?
Question 1: What does the price distribution look like?
Insight: The distribution is right-skewed. Most cars are priced at lower values, but a long tail of more expensive vehicles pulls the mean above the median. This is typical of used car markets, where a few luxury or collector cars co-exist with many affordable listings.
Question 2: Which manufacturers are most commonly listed?
Insight: American brands — Ford, Chevrolet, GMC, Dodge — dominate Craigslist listings. This reflects their popularity in the US market and the sheer volume of American used cars in circulation.
Question 3: Which manufacturers have the highest average prices?
Insight: Even among the most-listed brands, there is a meaningful spread in average price. Brands like GMC and Ram tend to skew higher, largely due to trucks, while others cluster at lower price points. Brand alone is already a useful signal of expected price range.
Question 4: How does vehicle condition affect price?
Note: the unknown category is excluded from this plot, since it dominates the count as a fallback fill for missing conditions and would obscure the pattern across real condition values.
Insight: Condition is one of the strongest price signals in the dataset. "New" and "like new" vehicles command the highest prices, while "salvage" cars are the cheapest. Salvage cars have been in accidents and written off by insurance companies, significantly reducing their market value.
Question 5: Is there a relationship between odometer reading and price?
Insight: There is a clear negative correlation between odometer and price. More miles means lower price, exactly as expected from the used-car market. The scatter plot also reveals high variance at low odometer readings, meaning newer low-mileage cars vary much more widely in price than high-mileage ones.
Question 6: Does fuel type influence price?
Insight: Gas cars dominate in quantity, but diesel and electric vehicles carry clear price premiums. Diesel engines are mostly found in trucks and commercial vehicles, which ties back to our drivetrain finding that 4WD vehicles are the priciest. Electric vehicles belong to a newer and generally higher-trim market segment, which explains their elevated average price.
Question 7: How does car age relate to price?
Insight: There is a clear downward trend. As cars get older, their average price falls. There are interesting bumps at very high ages (30 to 35 years): these are classic cars, which can spike in price, revealing a small but real collector-car market even on Craigslist.
Question 8: Does drive type affect price?
Insight: 4WD vehicles have the highest median price, followed by RWD, then FWD. 4WD is common in trucks and SUVs, and RWD is typical in luxury and sports cars. FWD sedans and hatchbacks dominate the lower price range.
Question 9: What do the numeric correlations look like overall?
Key Observations:
| Pair | Correlation | Meaning |
|---|---|---|
year and price |
Positive | Newer model year means higher price |
car_age and price |
Negative | Older car means lower price |
odometer and price |
Negative | More miles means lower price |
cylinders and price |
Positive | More cylinders means bigger engine and higher price |
year and car_age |
Strong Negative (near -1) | Expected, they are mathematically inverse |
All correlations match domain intuition, which gives confidence that the cleaned data is solid.
Summary of Findings
| Factor | Key Finding |
|---|---|
| Price Distribution | Right-skewed. Most cars are affordable; a few luxury cars inflate the mean |
| Top Manufacturers | Ford and Chevrolet dominate listings; GMC and Ram command the highest average prices |
| Vehicle Condition | One of the strongest signals. New and like-new cars cost significantly more |
| Odometer | Clear negative correlation. More miles means lower price |
| Fuel Type | Diesel and electric vehicles are priced higher on average |
| Car Age | Strong negative relationship. Older cars are cheaper, with rare classic car price spikes |
| Drive Type | 4WD vehicles are the most expensive on average |
| Correlations | Year, odometer, car_age, and cylinders all correlate meaningfully with price |
Conclusion: Used car pricing on Craigslist is driven by a combination of factors. Condition, age, mileage, and drivetrain are the strongest individual signals.
Used Car Price Calculator
As a practical application of the EDA findings, the notebook includes a simple price calculator. Given five inputs (manufacturer, year, odometer, condition, drive type), the calculator finds similar listings in the cleaned dataset and returns an estimated price, a typical price range, and a qualitative confidence level (High, Medium, or Low) based on how many similar cars were found and how consistent their prices are.
- Downloads last month
- 192









