This commit is contained in:
Oleg Sheynin 2024-06-12 19:53:18 +00:00
parent a3445075cc
commit a74ad29f8f

View File

@ -344,16 +344,108 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 143,
"id": "a7c8b332-cd4a-455f-b7cf-381aec15c456",
"metadata": {},
"outputs": [],
"source": []
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" date close_ltc volume_ltc vwap_ltc\n",
"0 1-0-0 0.8317 110.056253 0.831662\n",
"1 1-0-1 0.8312 176.868598 0.831441\n",
"2 1-0-2 0.8315 52.367396 0.831319\n"
]
}
],
"source": [
"# LTC\n",
"df_concat_ltc = df_concat[df_concat['instrument_id'] == 'PAIR-LTC-USD']\n",
"\n",
"# Reset Index\n",
"df_concat_ltc = df_concat_ltc.reset_index(drop = True)\n",
"\n",
"# Rename Vars\n",
"df_concat_ltc['close_ltc'] = df_concat_ltc['close']/100.00\n",
"df_concat_ltc['volume_ltc'] = df_concat_ltc['volume']\n",
"df_concat_ltc['vwap_ltc'] = df_concat_ltc['vwap']/100.00\n",
"\n",
"df_concat_ltc = df_concat_ltc.drop('close', axis = 1)\n",
"df_concat_ltc = df_concat_ltc.drop('volume', axis = 1)\n",
"df_concat_ltc = df_concat_ltc.drop('vwap', axis = 1)\n",
"df_concat_ltc = df_concat_ltc.drop('instrument_id', axis = 1)\n",
"\n",
"print (df_concat_ltc.head(3))"
]
},
{
"cell_type": "code",
"execution_count": 148,
"id": "0a27972a-f457-4ca5-8530-d6c87c7d9d91",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" date close_eth volume_eth vwap_eth\n",
"0 1-0-0 0.376204 37.497964 0.376108\n",
"1 1-0-1 0.375942 11.703305 0.376013\n",
"2 1-0-2 0.376096 145.335061 0.376016\n"
]
}
],
"source": [
"# ETH\n",
"df_concat_eth = df_concat[df_concat['instrument_id'] == 'PAIR-ETH-USD']\n",
"\n",
"# Reset Index\n",
"df_concat_eth = df_concat_eth.reset_index(drop = True)\n",
"\n",
"# Rename Vars\n",
"df_concat_eth['close_eth'] = df_concat_eth['close']/10000.00\n",
"df_concat_eth['volume_eth'] = df_concat_eth['volume']\n",
"df_concat_eth['vwap_eth'] = df_concat_eth['vwap']/10000.00\n",
"\n",
"df_concat_eth = df_concat_eth.drop('close', axis = 1)\n",
"df_concat_eth = df_concat_eth.drop('volume', axis = 1)\n",
"df_concat_eth = df_concat_eth.drop('vwap', axis = 1)\n",
"df_concat_eth = df_concat_eth.drop('instrument_id', axis = 1)\n",
"\n",
"print (df_concat_eth.head(3))"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0a27972a-f457-4ca5-8530-d6c87c7d9d91",
"id": "e94efeb3-eeeb-467b-9493-b305a3bf1a52",
"metadata": {},
"outputs": [],
"source": [
"# XRP\n",
"df_concat_ltc = df_concat[df_concat['instrument_id'] == 'PAIR-LTC-USD']\n",
"\n",
"# Reset Index\n",
"df_concat_ltc = df_concat_ltc.reset_index(drop = True)\n",
"\n",
"# Rename Vars\n",
"df_concat_ltc['close_ltc'] = df_concat_ltc['close']/100.00\n",
"df_concat_ltc['volume_ltc'] = df_concat_ltc['volume']\n",
"df_concat_ltc['vwap_ltc'] = df_concat_ltc['vwap']/100.00\n",
"\n",
"df_concat_ltc = df_concat_ltc.drop('close', axis = 1)\n",
"df_concat_ltc = df_concat_ltc.drop('volume', axis = 1)\n",
"df_concat_ltc = df_concat_ltc.drop('vwap', axis = 1)\n",
"df_concat_ltc = df_concat_ltc.drop('instrument_id', axis = 1)\n",
"\n",
"print (df_concat_ltc.head(3))"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "97a4fe65-b999-4459-b21e-8c1f0c20a25e",
"metadata": {},
"outputs": [],
"source": []