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

train = pd.read_csv('../input/train.csv')
test = pd.read_csv('../input/test.csv')

object_list = train.select_dtypes(include=['object']).columns
display(train[object_list].sample(10).T)
for f in object_list:
    print('Unique in column ', f, ' is -> ', len(train[f].unique()))
float_list = train.select_dtypes(include=['float64']).columns
display(train[float_list].sample(10).T)
int_list = train.select_dtypes(include=['int64']).columns
one_columns = []
for f in int_list:
    if len(train[f].unique()) == 1:
        one_columns.append(f)
train.drop(columns=one_columns, inplace=True)
test.drop(columns=one_columns, inplace=True)