mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-24 18:22:43 +00:00
* #3235 Put target_to into a column target and add existing targets if they exist * Check if target_to exists #3235 Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
This commit is contained in:
11
openbb_terminal/reports/templates/equity.ipynb
vendored
11
openbb_terminal/reports/templates/equity.ipynb
vendored
@@ -259,10 +259,13 @@
|
||||
"df_analyst = openbb.stocks.dd.analyst(symbol=symbol)\n",
|
||||
"print(df_analyst.columns)\n",
|
||||
"if not df_analyst.empty:\n",
|
||||
" if \"target_to\" in df_analyst.columns:\n",
|
||||
" df_analyst[\"target_to\"] = df_analyst[\"target_to\"].combine_first(\n",
|
||||
" df_analyst[\"target\"]\n",
|
||||
" )\n",
|
||||
" if \"target\" in df_analyst.columns:\n",
|
||||
" if \"target_to\" in df_analyst.columns:\n",
|
||||
" df_analyst[\"target\"] = df_analyst[\"target_to\"].combine_first(\n",
|
||||
" df_analyst[\"target\"]\n",
|
||||
" )\n",
|
||||
" else:\n",
|
||||
" df_analyst[\"target\"] = df_analyst[\"target_to\"]\n",
|
||||
" df_analyst = df_analyst[[\"category\", \"analyst\", \"rating\", \"target\"]].rename(\n",
|
||||
" columns={\n",
|
||||
" \"category\": \"Category\",\n",
|
||||
|
||||
Reference in New Issue
Block a user