text_html_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import seaborn as sns

df_drug = pd.read_csv('../input/drugsets/drug200.csv')
df_drug

name_cols = ['Sex', 'Drug', 'BP', 'Cholesterol']

name_cols = ['Sex', 'BP', 'Cholesterol']
for name_col in name_cols:
    df_Dr = df_drug.groupby(['Drug', name_col]).size().reset_index(name='Count')

df_drug.corr()

df_drug['Na_to_K_Bigger_Than_15'] = [1 if i >= 15.015 else 0 for i in df_drug.Na_to_K]
df_drug.head()