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

data = pd.read_csv('/kaggle/input/income/train.csv')
data.shape

all_columns = list(data.columns)
all_columns

data.isna().sum()

cat_columns = ['workclass', 'education', 'marital-status', 'occupation', 'relationship', 'race', 'gender', 'native-country']
for col in cat_columns:
    print('Unique values for ', col, 'is : ', data[col].nunique())