Loading and examining the cardiovascular data in Python
Now, let’s see how all this looks from the coding perspective. Open your Spyder or JupyterLab application and let’s load the pandas
library and the data.
Even before loading the data, we will use the information available on the dataset documentation website (http://archive.ics.uci.edu/dataset/45/heart+disease) to set 14 specific variable names.
Once you have opened Python in your IDE (Spyder or JupyterLab; this book uses Spyder IDE), first, let’s set the names of the variables according to the dataset documentation. This is needed because the original dataset column names are not added to the dataset, so we need to add them manually:
#Set the column names according to information from the dataset documentation column_names = [ Â Â Â Â "age", "sex", "cp", "trestbps", "chol", "fbs", "restecg", Â Â Â &...