<jupyter_start><jupyter_text>all_methods = pd.read_csv('Data.txt', sep='\t', index_col=0, parse_dates=True)all_methods_2 = all_methods.loc['1968-05-01':'1972-10-31']<jupyter_code>all_methods_2.head()
dates = all_methods_2.index.values.tolist()
observation = all_methods_2.loc[:,'Observation']
prediction =all_methods_2.loc[:,['Interpolation','Kalman','Locf','Mean','MovingAverage']]
prediction.head()
start_date = pd.to_datetime(dates[0], format="%Y-%m-%d")
end_date = pd.to_datetime(dates[len(dates)-2], format="%Y-%m-%d")
start_date = start_date
end_date = end_date + pd.DateOffset(days=1)
date_range = pd.date_range(start_date, end_date)
print(date_range.shape)
fig, ax = plt.subplots(figsize=(12, 4))

ax.plot(date_range,observation, label="observation",color='red')

#ax.plot(date_range, prediction['Interpolation'], label="Interpolation",color='blue',linestyle='dashed')
#ax.plot(date_range, prediction['Kalman'], label="Kalman",color='green',linestyle='dashed')
#ax.plot(date_range, prediction['Locf'], label="Locf",color='purple',linestyle='dashed')
#ax.plot(date_range, prediction['MovingAverage'], label="MovingAverage",color='black',linestyle='dashed')
ax.plot(date_range, prediction['Mean'], label="Mean",color='gray',linestyle='dashed')

ax.legend()
ax.set_title(f"Filling missing values from 1968 to 1973")
ax.xaxis.set_tick_params(rotation=90)
ax.set_xlabel("Date")
_ = ax.set_ylabel("Discharge (mm/d)")
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.19465387251542152, 'fraction_numerical': 0.02604523646333105, 'mean_word_length': 11.372881355932204, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '269096', 'license': 'MIT', 'n_tokens_mistral': 570, 'n_tokens_neox': 531, 'n_words': 62, 'path': 'AI_Fill_LSTM.ipynb', 'repo_name': 'nushrathumaira/FlooDyn_Pipeline', 'size': '1459'}