text_plain_output_1.png
import pandas as pd

target = 'yield'
df1 = pd.read_csv(TRAIN_CSV)
df1.rename({'Id': 'id'}, axis=1, inplace=True)
df1['test'] = 0
df1['gen'] = 1
df2 = pd.read_csv(TEST_CSV)
df2.rename({'Id': 'id'}, axis=1, inplace=True)
df2['test'] = 1
df2['gen'] = 1
df3 = pd.read_csv(EXTERNAL_CSV)
df3.rename({'Row#': 'id'}, axis=1, inplace=True)
df3['test'] = 0
df3['gen'] = 0
df = pd.concat([df1, df2, df3])
df.id.fillna(-1, inplace=True)
df.id = df.id.astype(int)
df.reset_index(inplace=True)
df.drop('index', axis=1, inplace=True)
df.head()