Course notes: Exploratory Data Analysis in Python
  • AI Chat
  • Code
  • Report
  • Beta
    Spinner

    Course Notes

    Use this workspace to take notes, store code snippets, or build your own interactive cheatsheet! The datasets used in this course are available in the datasets folder.

    # Import any packages you want to use here
    import pandas as pd
    import matplotlib.pyplot as plt
    import seaborn as sns

    Take Notes

    Add notes here about the concepts you've learned and code cells with code you want to keep.

    #Importing unemployment dataset
    unemployment = pd.read_csv('datasets/clean_unemployment.csv')
    unemployment.head()
    #Information about unemployment columns
    unemployment.info()
    # summary statistics
    unemployment.describe()
    unemployment.shape
    #Exploring continent column
    unemployment['continent'].value_counts().sort_values(ascending=False)
    Run cancelled
    #global unemployment rates in 2021
    #Data is represented as percentage in the column
    sns.histplot(data=unemployment, x='2021', binwidth=1)

    As observed from the graph, many countries had unemployment between 3% to 8% and a few had above 20%

    Run cancelled
    unemployment.dtypes
    Run cancelled
    not_oceania = unemployment[~unemployment['continent'].isin(['Oceania'])]
    not_oceania
    Run cancelled
    #Exploring unemployment rate in 2021
    sns.boxplot(x='2021', y='continent', data=unemployment)
    plt.show()