#1st approach
import pandas as pd
from matplotlib import pyplot as plt
#read data
data=pd.read_csv("./datasets/train.csv", index_col='Date', parse_dates='Date')
data['Weight'].plot(marker = 'x',title='reported Weight')
plt.show()
#interpolation
data['WeightInter'] = data['Weight'].interpolate()
data['WeightInter'].plot(marker = 'x',title='interpolated Weight')
plt.show()
#load testdata
test = pd.read_csv("./datasets/test.csv")
print(test)
#join data
data = data.set_index('ID')
predictions = test.join(data,on='ID')
predictions[['ID','WeightInter']].to_csv('sampleSubmission.csv', header = ['ID','Weight'],index_label=False,index=False)