mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-05 08:51:20 +00:00
Fix colwidth deprecation notice
This commit is contained in:
@@ -132,7 +132,7 @@ def orders(l_args):
|
||||
+ ":"
|
||||
)
|
||||
|
||||
pd.set_option("display.max_colwidth", -1)
|
||||
pd.set_option("display.max_colwidth", None)
|
||||
|
||||
if USE_COLOR:
|
||||
df_orders["Buy / Sell Ratio"] = df_orders["Buy / Sell Ratio"].apply(
|
||||
|
||||
@@ -61,7 +61,7 @@ def earnings_release_dates(l_args):
|
||||
df_earnings["Date"] = pd.to_datetime(df_earnings["Date"])
|
||||
df_earnings = df_earnings.set_index("Date")
|
||||
|
||||
pd.set_option("display.max_colwidth", -1)
|
||||
pd.set_option("display.max_colwidth", None)
|
||||
for n_days, earning_date in enumerate(df_earnings.index.unique()):
|
||||
if n_days > (ns_parser.n_num - 1):
|
||||
break
|
||||
|
||||
@@ -69,7 +69,7 @@ def high_short_interest(l_args):
|
||||
|
||||
shorted_stock_data = list()
|
||||
|
||||
pd.set_option("display.max_colwidth", -1)
|
||||
pd.set_option("display.max_colwidth", None)
|
||||
print(df_high_short_interest.head(n=ns_parser.n_num).to_string(index=False))
|
||||
print("")
|
||||
|
||||
@@ -130,6 +130,6 @@ def low_float(l_args):
|
||||
|
||||
low_float_data = list()
|
||||
|
||||
pd.set_option("display.max_colwidth", -1)
|
||||
pd.set_option("display.max_colwidth", None)
|
||||
print(df_low_float.head(n=ns_parser.n_num).to_string(index=False))
|
||||
print("")
|
||||
|
||||
@@ -98,7 +98,7 @@ def price_target_from_analysts(l_args, df_stock, s_ticker, s_start, s_interval):
|
||||
plt.show()
|
||||
print("")
|
||||
|
||||
pd.set_option("display.max_colwidth", -1)
|
||||
pd.set_option("display.max_colwidth", None)
|
||||
print(
|
||||
df_analyst_data.sort_index(ascending=False)
|
||||
.head(ns_parser.n_num)
|
||||
|
||||
@@ -35,7 +35,7 @@ def sec_fillings(l_args, s_ticker):
|
||||
try:
|
||||
ns_parser = parse_known_args_and_warn(parser, l_args)
|
||||
|
||||
pd.set_option("display.max_colwidth", -1)
|
||||
pd.set_option("display.max_colwidth", None)
|
||||
|
||||
url_financials = f"https://www.marketwatch.com/investing/stock/{s_ticker}/financials/secfilings"
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ def overview(l_args, s_ticker):
|
||||
}
|
||||
)
|
||||
|
||||
pd.set_option("display.max_colwidth", -1)
|
||||
pd.set_option("display.max_colwidth", None)
|
||||
|
||||
print(df_fa.drop(index=["Description"]).to_string(header=False))
|
||||
print(f"Description: {df_fa.loc['Description'][0]}")
|
||||
@@ -185,7 +185,7 @@ def income_statement(l_args, s_ticker):
|
||||
ns_parser = parse_known_args_and_warn(parser, l_args)
|
||||
|
||||
if ns_parser.n_num == 1:
|
||||
pd.set_option("display.max_colwidth", -1)
|
||||
pd.set_option("display.max_colwidth", None)
|
||||
else:
|
||||
pd.options.display.max_colwidth = 40
|
||||
|
||||
@@ -254,7 +254,7 @@ def balance_sheet(l_args, s_ticker):
|
||||
return
|
||||
|
||||
if ns_parser.n_num == 1:
|
||||
pd.set_option("display.max_colwidth", -1)
|
||||
pd.set_option("display.max_colwidth", None)
|
||||
else:
|
||||
pd.options.display.max_colwidth = 40
|
||||
|
||||
@@ -317,7 +317,7 @@ def cash_flow(l_args, s_ticker):
|
||||
ns_parser = parse_known_args_and_warn(parser, l_args)
|
||||
|
||||
if ns_parser.n_num == 1:
|
||||
pd.set_option("display.max_colwidth", -1)
|
||||
pd.set_option("display.max_colwidth", None)
|
||||
else:
|
||||
pd.options.display.max_colwidth = 40
|
||||
|
||||
@@ -370,7 +370,7 @@ def earnings(l_args, s_ticker):
|
||||
ns_parser = parse_known_args_and_warn(parser, l_args)
|
||||
|
||||
if ns_parser.n_num == 1:
|
||||
pd.set_option("display.max_colwidth", -1)
|
||||
pd.set_option("display.max_colwidth", None)
|
||||
else:
|
||||
pd.options.display.max_colwidth = 40
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ def enterprise(l_args, s_ticker):
|
||||
ns_parser = parse_known_args_and_warn(parser, l_args)
|
||||
|
||||
if ns_parser.n_num == 1:
|
||||
pd.set_option("display.max_colwidth", -1)
|
||||
pd.set_option("display.max_colwidth", None)
|
||||
else:
|
||||
pd.options.display.max_colwidth = 40
|
||||
|
||||
@@ -169,7 +169,7 @@ def discounted_cash_flow(l_args, s_ticker):
|
||||
ns_parser = parse_known_args_and_warn(parser, l_args)
|
||||
|
||||
if ns_parser.n_num == 1:
|
||||
pd.set_option("display.max_colwidth", -1)
|
||||
pd.set_option("display.max_colwidth", None)
|
||||
else:
|
||||
pd.options.display.max_colwidth = 40
|
||||
|
||||
@@ -229,7 +229,7 @@ def income_statement(l_args, s_ticker):
|
||||
ns_parser = parse_known_args_and_warn(parser, l_args)
|
||||
|
||||
if ns_parser.n_num == 1:
|
||||
pd.set_option("display.max_colwidth", -1)
|
||||
pd.set_option("display.max_colwidth", None)
|
||||
else:
|
||||
pd.options.display.max_colwidth = 40
|
||||
|
||||
@@ -244,7 +244,7 @@ def income_statement(l_args, s_ticker):
|
||||
|
||||
print(df_fa.drop(index=["Final link", "Link"]).to_string())
|
||||
|
||||
pd.set_option("display.max_colwidth", -1)
|
||||
pd.set_option("display.max_colwidth", None)
|
||||
print("")
|
||||
print(df_fa.loc["Final link"].to_frame().to_string())
|
||||
print("")
|
||||
@@ -300,7 +300,7 @@ def balance_sheet(l_args, s_ticker):
|
||||
ns_parser = parse_known_args_and_warn(parser, l_args)
|
||||
|
||||
if ns_parser.n_num == 1:
|
||||
pd.set_option("display.max_colwidth", -1)
|
||||
pd.set_option("display.max_colwidth", None)
|
||||
else:
|
||||
pd.options.display.max_colwidth = 40
|
||||
|
||||
@@ -317,7 +317,7 @@ def balance_sheet(l_args, s_ticker):
|
||||
|
||||
print(df_fa.drop(index=["Final link", "Link"]).to_string())
|
||||
|
||||
pd.set_option("display.max_colwidth", -1)
|
||||
pd.set_option("display.max_colwidth", None)
|
||||
print("")
|
||||
print(df_fa.loc["Final link"].to_frame().to_string())
|
||||
print("")
|
||||
@@ -371,7 +371,7 @@ def cash_flow(l_args, s_ticker):
|
||||
ns_parser = parse_known_args_and_warn(parser, l_args)
|
||||
|
||||
if ns_parser.n_num == 1:
|
||||
pd.set_option("display.max_colwidth", -1)
|
||||
pd.set_option("display.max_colwidth", None)
|
||||
else:
|
||||
pd.options.display.max_colwidth = 40
|
||||
|
||||
@@ -386,7 +386,7 @@ def cash_flow(l_args, s_ticker):
|
||||
|
||||
print(df_fa.drop(index=["Final link", "Link"]).to_string())
|
||||
|
||||
pd.set_option("display.max_colwidth", -1)
|
||||
pd.set_option("display.max_colwidth", None)
|
||||
print("")
|
||||
print(df_fa.loc["Final link"].to_frame().to_string())
|
||||
print("")
|
||||
@@ -445,7 +445,7 @@ def key_metrics(l_args, s_ticker):
|
||||
ns_parser = parse_known_args_and_warn(parser, l_args)
|
||||
|
||||
if ns_parser.n_num == 1:
|
||||
pd.set_option("display.max_colwidth", -1)
|
||||
pd.set_option("display.max_colwidth", None)
|
||||
else:
|
||||
pd.options.display.max_colwidth = 50
|
||||
|
||||
@@ -514,7 +514,7 @@ def financial_ratios(l_args, s_ticker):
|
||||
ns_parser = parse_known_args_and_warn(parser, l_args)
|
||||
|
||||
if ns_parser.n_num == 1:
|
||||
pd.set_option("display.max_colwidth", -1)
|
||||
pd.set_option("display.max_colwidth", None)
|
||||
else:
|
||||
pd.options.display.max_colwidth = 40
|
||||
|
||||
@@ -579,7 +579,7 @@ def financial_statement_growth(l_args, s_ticker):
|
||||
ns_parser = parse_known_args_and_warn(parser, l_args)
|
||||
|
||||
if ns_parser.n_num == 1:
|
||||
pd.set_option("display.max_colwidth", -1)
|
||||
pd.set_option("display.max_colwidth", None)
|
||||
else:
|
||||
pd.options.display.max_colwidth = 50
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ def info(l_args, s_ticker):
|
||||
df_info.index = df_info.index.str.replace("p e", "PE")
|
||||
df_info.index = df_info.index.str.replace("Peg", "PEG")
|
||||
|
||||
pd.set_option("display.max_colwidth", -1)
|
||||
pd.set_option("display.max_colwidth", None)
|
||||
|
||||
if "Long business summary" in df_info.index:
|
||||
print(df_info.drop(index=["Long business summary"]).to_string(header=False))
|
||||
@@ -94,7 +94,7 @@ def shareholders(l_args, s_ticker):
|
||||
parse_known_args_and_warn(parser, l_args)
|
||||
|
||||
stock = yf.Ticker(s_ticker)
|
||||
pd.set_option("display.max_colwidth", -1)
|
||||
pd.set_option("display.max_colwidth", None)
|
||||
|
||||
# Major holders
|
||||
print("Major holders")
|
||||
@@ -165,7 +165,7 @@ def sustainability(l_args, s_ticker):
|
||||
parse_known_args_and_warn(parser, l_args)
|
||||
|
||||
stock = yf.Ticker(s_ticker)
|
||||
pd.set_option("display.max_colwidth", -1)
|
||||
pd.set_option("display.max_colwidth", None)
|
||||
|
||||
df_sustainability = stock.sustainability
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ def trending(l_args):
|
||||
[symbol["symbol"], symbol["watchlist_count"], symbol["title"]]
|
||||
)
|
||||
|
||||
pd.set_option("display.max_colwidth", -1)
|
||||
pd.set_option("display.max_colwidth", None)
|
||||
df_trending = pd.DataFrame(
|
||||
l_symbols, columns=["Ticker", "Watchlist Count", "Name"]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user