text_plain_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

import warnings

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.preprocessing import OneHotEncoder, LabelBinarizer, StandardScaler
from sklearn.model_selection import train_test_split
from imblearn.over_sampling import SMOTE
plt.style.use('fivethirtyeight')
import warnings
from sklearn.tree import DecisionTreeClassifier, plot_tree, export_text, export_graphviz
import graphviz
from sklearn.metrics import confusion_matrix, plot_confusion_matrix, classification_report, RocCurveDisplay
from sklearn.model_selection import train_test_split, GridSearchCV
warnings.filterwarnings('ignore')

drug = pd.read_csv('../input/drug-classification/drug200.csv')

drug.columns

(drug.size, drug.shape)

drug.isnull().sum().sum()

plt.figure(figsize=(14, 5))
plt.subplot(131)
plt.pie(drug['Sex'].value_counts(), labels=drug['Sex'].value_counts().index, autopct='%0.2f%%', wedgeprops={'width': 0.2}, shadow=True)
plt.title('Gender Composition')
plt.subplot(132)
plt.pie(drug['BP'].value_counts(), labels=drug['BP'].value_counts().index, autopct='%0.2f%%', wedgeprops={'width': 0.3}, shadow=True, colors=['red', 'green', 'orange'], pctdistance=0.4)
plt.title('Blood Pressure Composition')
plt.subplot(133)
plt.pie(drug['Cholesterol'].value_counts(), labels=drug['Cholesterol'].value_counts().index, autopct='%0.2f%%', wedgeprops={'width': 0.2}, shadow=True)
plt.title('Cholesterol Composition')
plt.show()