MPG Dataset
The MPG dataset contains information about miles per gallon for different car models and their attributes. It includes features such as miles per gallon, number of cylinders in the engine, engine displacement, engine horsepower, vehicle weight, acceleration, model year, origin of the car, and car model name.
Advantages: Real-world dataset with diverse features, suitable for regression analysis and predicting fuel efficiency.
Disadvantages: Some missing values in the horsepower column, large dataset with many features.
Features and Characteristics
- mpg: Miles per gallon (numerical)
- cylinders: Number of cylinders in the engine (numerical)
- displacement: Engine displacement in cubic inches (numerical)
- horsepower: Engine horsepower (numerical)
- weight: Vehicle weight in pounds (numerical)
- acceleration: Acceleration in seconds from 0 to 60 mph (numerical)
- model_year: Model year (categorical)
- origin: Origin of the car (1 = American, 2 = European, 3 = Japanese) (categorical)
- name: Car model name (string)
How to load MPG Dataset?
mpg = sns.load_dataset("mpg")
print(mpg.head())
mpg | cylinders | displacement | horsepower | weight | acceleration | model_year | origin | name |
---|---|---|---|---|---|---|---|---|
18.0 | 8 | 307.0 | 130.0 | 3504 | 12.0 | 70 | 1 | chevrolet chevelle … |
15.0 | 8 | 350.0 | 165.0 | 3693 | 11.5 | 70 | 1 | buick skylark 320 |
18.0 | 8 | 318.0 | 150.0 | 3436 | 11.0 | 70 | 1 | plymouth satellite … |
16.0 | 8 | 304.0 | 150.0 | 3433 | 12.0 | 70 | 1 | amc rebel sst |
17.0 | 8 | 302.0 | 140.0 | 3449 | 10.5 | 70 | 1 | ford torino |
Seaborn Datasets For Data Science
Seaborn, a Python data visualization library, offers a range of built-in datasets that are perfect for practicing and demonstrating various data science concepts. These datasets are designed to be simple, intuitive, and easy to work with, making them ideal for beginners and experienced data scientists alike.
In this article, we’ll explore the different datasets available in Seaborn, their characteristics, advantages, and disadvantages, and how they can be used for various data analysis and visualization tasks.
Seaborn Datasets For Data Science
- 1. Tips Dataset
- 2. Iris Dataset
- 3. Penguins Dataset
- 4. Flights Dataset
- 5. Diamonds Dataset
- 6. Titanic Dataset
- 7. Exercise Dataset
- 8. MPG Dataset
- 9. Planets Dataset