text_plain_output_1.png
from subprocess import check_output

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

import numpy as np
import pandas as pd
from subprocess import check_output
from sklearn.ensemble import RandomForestClassifier
df = pd.read_json('../input/train.json')
df.shape()

df = pd.read_json('../input/train.json')

df['num_feature'] = df['features'].apply(len)
df['num_photos'] = df['photos'].apply(len)
df['num_description_words'] = df['description'].apply(lambda x: len(x.split(' ')))
interest_num = {'low': 0, 'medium': 0.5, 'high': 1}
df['interest_num'] = df['interest_level'].apply(lambda x: interest_num[x])
choose_feature = ['bathrooms', 'bedroom', 'price', 'num_feature', 'num_description_words', 'interest_num']
print(df[df.isnull()])