* Fix of #2833

* removed debug prints

Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt>
This commit is contained in:
Raffaele Abate
2022-10-16 00:47:10 +02:00
committed by GitHub
parent 74c8eae2d3
commit ecb36bf561

View File

@@ -133,7 +133,6 @@
"outputs": [],
"source": [
"info = openbb.stocks.fa.info(symbol=symbol).transpose()\n",
"\n",
"if info[\"Long business summary\"][0] != \"NA\":\n",
" overview = info[\"Long business summary\"][0]\n",
"else:\n",
@@ -182,6 +181,10 @@
"outputs": [],
"source": [
"tables = openbb.etf.news(info[\"Short name\"][0], 5)\n",
"\n",
"# Add an empty iterator if it the returned type is None\n",
"# i.e.: in case of lack of a valid API\n",
"tables = tables if tables is not None else []\n",
"for table in tables:\n",
" table[0].loc[\"link\"] = (\n",
" table[0].loc[\"link\"].apply(lambda x: f'<a href=\"{x}\">{x}</a>')\n",
@@ -532,6 +535,10 @@
"outputs": [],
"source": [
"similar_companies = openbb.stocks.ca.polygon_peers(symbol)\n",
"\n",
"# Add an empty list if it the returned list is empty\n",
"# i.e.: in case of lack of a valid API\n",
"similar_companies = similar_companies if similar_companies is not None else []\n",
"similar_companies.append(symbol)"
]
},
@@ -1375,9 +1382,13 @@
" )\n",
"except:\n",
" pass\n",
"htmlcode += widgets.row(\n",
" [widgets.h(3, f\"Enterprise data for {symbol}\") + enterprise_df.to_html()]\n",
")\n",
"\n",
"try:\n",
" htmlcode += widgets.row(\n",
" [widgets.h(3, f\"Enterprise data for {symbol}\") + enterprise_df.to_html()]\n",
" )\n",
"except:\n",
" pass\n",
"htmlcode += widgets.row(\n",
" [widgets.h(3, f\"Income Statement for {symbol}\") + income_df.to_html()]\n",
")\n",
@@ -1391,9 +1402,7 @@
" )\n",
"except:\n",
" pass\n",
"\n",
"body += widgets.add_tab(\"Fundamental Analysis\", htmlcode)\n",
"\n",
"htmlcode = widgets.row([widgets.h(3, \"Put to call ratio\") + pcr_chart])\n",
"htmlcode += widgets.row(\n",
" [widgets.h(3, \"Option Volume for closest expiry date\") + vol_chart]\n",
@@ -1574,7 +1583,7 @@
"metadata": {
"celltoolbar": "Tags",
"kernelspec": {
"display_name": "Python 3.9.13 ('obb')",
"display_name": "Python 3.10.4 ('obb')",
"language": "python",
"name": "python3"
},
@@ -1588,11 +1597,11 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.13"
"version": "3.10.4"
},
"vscode": {
"interpreter": {
"hash": "ab0e87f2bc73919b75956d1b3e303320699d53da895be1bb46287d7dc67c6497"
"hash": "1a8cc6b6e60740679b24fc1ea93bdeb94d949a22102a80c99b7fd3f0d572afd6"
}
}
},