text_html_output_1.png
from sklearn.preprocessing import LabelEncoder

import matplotlib.pyplot as plt

import pandas as pd

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

import pandas as pd
train = pd.read_csv('../input/30-days-of-ml/train.csv', index_col=0)
test = pd.read_csv('../input/30-days-of-ml/test.csv', index_col=0)
Sample_result = pd.read_csv('../input/30-days-of-ml/sample_submission.csv')

import matplotlib.pyplot as plt

from sklearn.preprocessing import LabelEncoder
encoder = LabelEncoder()
s = train.dtypes == 'object'
object_cols = list(s[s].index)
for col in object_cols:
    train[col] = encoder.fit_transform(train[col])
    test[col] = encoder.transform(test[col])

X = train
y = train.target
X_test = test
X.info()