Appendix

1. Data Exploration and Cleaning

Activity 1.01: Exploring the Remaining Financial Features in the Dataset

Solution:

Before beginning, set up your environment and load in the cleaned dataset as follows:

import pandas as pd

import matplotlib.pyplot as plt #import plotting package

#render plotting automatically

%matplotlib inline

import matplotlib as mpl #additional plotting functionality

mpl.rcParams['figure.dpi'] = 400 #high resolution figures

mpl.rcParams['font.size'] = 4 #font size for figures

from scipy import stats

import numpy as np

df = pd.read_csv('../../Data/Chapter_1_cleaned_data.csv')

  1. Create lists of feature names for the remaining financial features.

    These fall into two groups, so we will make lists of feature names as before, ...

Get Data Science Projects with Python - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.