<jupyter_start><jupyter_text>Read datasets<jupyter_code>df = pd.read_csv('reservoir_dataset.csv')
df
df.set_index('FLOW_DATE', inplace=True)
df.head()
df = df[df['RESERVOIR'] == 'K.R.S'].sort_index()
df
plt.figure(figsize=(25, 10))
# plt.plot(df['RAINFALL'] / df['RAINFALL'].max(), label='RAINFALL')
plt.plot(df['INFLOW_CUSECS'] / df['INFLOW_CUSECS'].max(), label='INFLOW')
plt.legend()
plt.show()
df_bkp = df.copy()
df.sort_values('INFLOW_CUSECS', ascending=False).head(5)
desc = df['INFLOW_CUSECS'].describe([.25, .5, .75, .85, .90, .95, .99, .999])
desc
desc['99%']
df = df[(df['INFLOW_CUSECS'] <= desc['99%'])].sort_index()
df
plt.figure(figsize=(25, 10))
# plt.plot(df['RAINFALL'] / df['RAINFALL'].max(), label='RAINFALL')
plt.plot(df['INFLOW_CUSECS'] / df['INFLOW_CUSECS'].max(), label='INFLOW')
plt.legend()
plt.show()
df.to_csv('reservoir_dataset_engg.csv', index=False)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.24008810572687225, 'fraction_numerical': 0.031938325991189426, 'mean_word_length': 7.6571428571428575, 'pattern_counts': {'":': 0, '<': 6, '<?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': '155086', 'license': 'MIT', 'n_tokens_mistral': 435, 'n_tokens_neox': 400, 'n_words': 52, 'path': 'python_scripts/dataset/5_inflow_dataset_engineering.ipynb', 'repo_name': 'santanu94/WRI_Wave2WebHack', 'size': '908'}