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

df = pd.read_csv('../input/water-potability/water_potability.csv')

df.isnull().sum()

df.Potability.value_counts()

df_notpotable = df[df['Potability'] == 0]
df_potable = df[df['Potability'] == 1]

df_notpotable.isnull().sum()

df_potable.isnull().sum()

df_notpotable.isnull().sum()

df.Potability.value_counts()

df_potable.isnull().sum()

df = pd.concat([df_notpotable, df_potable])

df = df.sample(frac=1)

x = df.drop('Potability', axis=1)
y = df['Potability']

df.hist(bins=10, figsize=(20, 15), color='teal')