text_plain_output_1.png
import pandas as pd

import pandas as pd
raw_data = pd.read_csv('../input/train.csv')

columns = raw_data.columns.tolist()
if 'Id' in columns:
    columns.remove('Id')

columns_with_null_values = []
for c in columns:
    f = c
    feature_name = str(f)
    has_null = str(any(raw_data[f].isnull().values))
    if has_null == 'True':
        columns_with_null_values.append(f)
        column_type = raw_data[f].dtype

column_names = raw_data.columns.drop('Id')
int_columns, float_columns, object_columns = ([], [], [])
for c in column_names:
    column_dtype = str(raw_data.dtypes[c])
    if column_dtype == 'int64':
        int_columns.append(c)
    elif column_dtype == 'object':
        object_columns.append(c)
    elif column_dtype == 'float64':
        float_columns.append(c)

numerical_columns, categorical_columns = ([], [])
temporal_columns = ['GarageYrBlt', 'YearBuilt', 'YearRemodAdd', 'MoSold', 'YrSold']
from_int = ['MSSubClass']
categorical_columns = object_columns + from_int + temporal_columns
numerical_columns = list(filter(lambda x: x not in temporal_columns + ['MSSubClass'], int_columns)) + list(filter(lambda x: x not in temporal_columns, float_columns))
print(numerical_columns)