# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

import pandas as pd
import numpy as np

df = pd.read_csv('cars.csv',delimiter=';')
df.head(10)

df.dtypes

df.isnull().sum()

import seaborn as sns
import matplotlib.pyplot as plt
# %matplotlib inline

# <h2 style="color:blue" align="left"> 1. You can use heatmaps to visualize your data highlighting the missing data </h2>

plt.figure(figsize=(10,9))
sns.heatmap(df.isnull())

plt.figure(figsize=(10,9))
sns.heatmap(df.isnull(), cbar=False)

plt.figure(figsize=(10,9))
sns.heatmap(df.isnull(), yticklabels=False, cbar=False)

plt.figure(figsize=(10,8))
sns.heatmap(df.isnull(), yticklabels=False, cbar=False, cmap='viridis')

# <h2 style="color:blue" align="left"> 2. You can visualize each column of data in boxplots to find outliers </h2>

df1 = df.iloc[1:]
df1

plt.figure(figsize=(12, 7))
sns.boxplot(x='MPG', y='Cylinders', data=df, palette='winter')

StarcoderdataJupyterScriptsDedupFiltered