summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJingyi Z <zhao.elton@gmail.com>2024-06-13 05:33:01 -0700
committerGitHub <noreply@github.com>2024-06-13 12:33:01 +0000
commit7e30ffcad8810ae2bfc1b0ecbefdc525665e385a (patch)
tree984baf19ce254188e847a4c52ce8384317c5b44b
parent8b9f461dcaffabdd4609d942795ba9de8e261a2d (diff)
chore: fix interval bug in the pynb (#6435)
* chore: fix interval bug in the pynb * fix index to datetime conversion --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: Henrique Joaquim <henriquecjoaquim@gmail.com>
-rw-r--r--examples/copperToGoldRatio.ipynb4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/copperToGoldRatio.ipynb b/examples/copperToGoldRatio.ipynb
index cb5dd96fecc..81584cfbce0 100644
--- a/examples/copperToGoldRatio.ipynb
+++ b/examples/copperToGoldRatio.ipynb
@@ -46,11 +46,11 @@
" obb.derivatives.futures.historical(\n",
" symbol,\n",
" start_date=\"2000-01-01\",\n",
- " interval=\"1wk\",\n",
+ " interval=\"1W\",\n",
" ).to_df()[\"close\"].rename(symbol)\n",
" )\n",
"data.columns = cols_dict.values()\n",
- "data.index = data.index.strftime(\"%Y-%m-%d\")"
+ "data.index = pd.to_datetime(data.index)"
]
},
{