text_html_output_1.png
from sklearn.preprocessing import LabelEncoder

import pandas as pd

train = pd.read_csv('../input/hr-analytics-job-change-of-data-scientists/aug_train.csv')

from sklearn.preprocessing import LabelEncoder
le = LabelEncoder()
def FunLabelEncoder(df):
    for c in df.columns:
        if df.dtypes[c] == object:
            le.fit(df[c].astype(str))
            df[c] = le.transform(df[c].astype(str))
    return df

test = pd.read_csv('../input/hr-analytics-job-change-of-data-scientists/aug_test.csv')

test = FunLabelEncoder(test)
test.info()