Skip to content

Instantly share code, notes, and snippets.

@roboreport roboreport/splitdata.py Secret
Created Jan 28, 2019

Embed
What would you like to do?
train = df[(df.year > 2006) & (df.year < 2017)]
test = df[df.year >= 2017]
feature_names = ['region_cd', 'year', 'month', 'building_type',
'tradeprice_sido', 'construction_realized_amount','cd',
'spirit_deposit_rate','exchange_rate','composite_stock_price_index',
'economy_growth','exchequer_bond_three','household_loan_all',
'mortgage_all','numberofnosells','unsalenum_c']
X_train = train[feature_names]
X_test = test[feature_names]
lable_name = "tradeprice_sido_n1"
Y_train = train[lable_name]
Y_test = test[lable_name]
print(X_train.shape)
print(X_test.shape)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.