image_output_1.png
import pandas as pd

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

data = pd.read_csv('/kaggle/input/adult-census-income/adult.csv', na_values='?')

data.shape

data.columns = ['age', 'workclass', 'fnlwgt', 'education', 'education_num', 'marital_status', 'occupation', 'relationship', 'race', 'sex', 'capital_gain', 'capital_loss', 'hours_per_week', 'native_country', 'income']

data.isna().sum()

data = data.replace({'<=50K': 0, '>50K': 1})
data = data.replace({'<=50K': 0, '>50K': 1})

data.corr()