text_html_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

df = pd.read_csv('../input/heart-disease-uci/heart.csv')

df.shape

pd.crosstab(df.sex, df.target)

pd.crosstab(df.cp, df.target)

pd.crosstab(df.age, df.trestbps)

plt.figure(figsize=(10, 6))
plt.scatter(df.trestbps[df.target == 1], df.age[df.target == 1])
plt.scatter(df.trestbps[df.target == 0], df.age[df.target == 0])
plt.xlabel('Resting Blood Pressure (mm Hg)')
plt.ylabel('Age (Years)')
plt.title('Relation between the Resting Blood Pressure vs Age')
plt.legend(['Disease', 'No-Disease'])