mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-02 15:32:04 +00:00
Fix Pandas Warning (#1250)
* Fixed Pandas wanring issue * Adjusted warning mute
This commit is contained in:
@@ -96,6 +96,7 @@ def add_order_total(df_orders: DataFrame) -> DataFrame:
|
||||
for i, candle in enumerate(["Volume", "Open", "Close", "High", "Low", "Total"]):
|
||||
df_orders.insert(i + 3, candle.lower(), 0)
|
||||
|
||||
pd.options.mode.chained_assignment = None
|
||||
for i, _ in df_orders.iterrows():
|
||||
if np.isnan(
|
||||
prices["Open"][df_orders.loc[i, "ticker"]][
|
||||
@@ -115,4 +116,6 @@ def add_order_total(df_orders: DataFrame) -> DataFrame:
|
||||
df_orders.loc[i, "close"] * df_orders.loc[i, "shares"]
|
||||
)
|
||||
|
||||
pd.options.mode.chained_assignment = "warn"
|
||||
|
||||
return df_orders
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
__docformat__ = "numpy"
|
||||
|
||||
import os
|
||||
|
||||
from gamestonk_terminal import feature_flags as gtff
|
||||
from gamestonk_terminal.helper_funcs import export_data, rich_table_from_df
|
||||
from gamestonk_terminal.stocks.discovery import ark_model
|
||||
@@ -72,8 +71,6 @@ def ark_orders_view(
|
||||
if gtff.USE_COLOR:
|
||||
df_orders["direction"] = df_orders["direction"].apply(direction_color_red_green)
|
||||
|
||||
# df_orders["link"] = "https://finviz.com/quote.ashx?t=" + df_orders["ticker"]
|
||||
|
||||
rich_table_from_df(
|
||||
df_orders,
|
||||
headers=[x.title() for x in df_orders.columns],
|
||||
|
||||
Reference in New Issue
Block a user