mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-28 04:52:07 +00:00
Merge branch 'feature/DegiroIntegration' of github.com:Chavithra/GamestonkTerminal into feature/DegiroIntegration
This commit is contained in:
@@ -57,13 +57,13 @@ def ratings_view(other_args: List[str]):
|
||||
)
|
||||
|
||||
df_ratings["clean_current_price"] = df_ratings["current_price"].apply(
|
||||
lambda x: "".join([c if c.isdigit() or c == "." else "" for c in str(x)])
|
||||
lambda x: "".join(c if c.isdigit() or c == "." else "" for c in str(x))
|
||||
)
|
||||
df_ratings["clean_current_price"] = df_ratings["clean_current_price"].astype(
|
||||
float
|
||||
)
|
||||
df_ratings["clean_target_price"] = df_ratings["new_target"].apply(
|
||||
lambda x: "".join([c if c.isdigit() or c == "." else "" for c in str(x)])
|
||||
lambda x: "".join(c if c.isdigit() or c == "." else "" for c in str(x))
|
||||
)
|
||||
df_ratings["clean_target_price"] = df_ratings["clean_target_price"].astype(
|
||||
float
|
||||
|
||||
@@ -104,7 +104,7 @@ def management(other_args: List[str], ticker: str):
|
||||
for ind in df_management.index:
|
||||
s_name = f"{ind}{(max([len(x) for x in df_management.index])-len(ind))*' '}"
|
||||
df_mgmt_title = df_management["Title"]
|
||||
spaces = max([len(x) for x in df_mgmt_title]) - len(df_mgmt_title[ind])
|
||||
spaces = max(len(x) for x in df_mgmt_title) - len(df_mgmt_title[ind])
|
||||
s_title = f"{df_mgmt_title[ind]}{spaces * ' '}"
|
||||
s_management = f"""{s_name} {s_title} {df_management['Info'][ind]}"""
|
||||
print(s_management)
|
||||
|
||||
@@ -326,10 +326,10 @@ def text_adjustment_join_unicode(self, lines, sep=""):
|
||||
def text_adjustment_adjoin(self, space, *lists, **kwargs):
|
||||
# Add space for all but the last column:
|
||||
pads = ([space] * (len(lists) - 1)) + [0]
|
||||
max_col_len = max([len(col) for col in lists])
|
||||
max_col_len = max(len(col) for col in lists)
|
||||
new_cols = []
|
||||
for col, pad in zip(lists, pads):
|
||||
width = max([self.len(s) for s in col]) + pad
|
||||
width = max(self.len(s) for s in col) + pad
|
||||
c = self.justify(col, width, mode="left")
|
||||
# Add blank cells to end of col if needed for different col lens:
|
||||
if len(col) < max_col_len:
|
||||
|
||||
@@ -150,7 +150,7 @@ def arima(other_args: List[str], s_ticker: str, df_stock: pd.DataFrame):
|
||||
|
||||
# Machine Learning model
|
||||
if ns_parser.s_order:
|
||||
t_order = tuple([int(ord) for ord in ns_parser.s_order.split(",")])
|
||||
t_order = tuple(int(ord) for ord in ns_parser.s_order.split(","))
|
||||
model = ARIMA(df_stock["5. adjusted close"].values, order=t_order).fit()
|
||||
l_predictions = model.predict(
|
||||
start=len(df_stock["5. adjusted close"]) + 1,
|
||||
|
||||
@@ -119,7 +119,7 @@ def arima(
|
||||
return
|
||||
|
||||
if ns_parser.s_order:
|
||||
t_order = tuple([int(ord) for ord in list(ns_parser.s_order)])
|
||||
t_order = tuple(int(ord) for ord in list(ns_parser.s_order))
|
||||
model_fit = ARIMA(stock.values, order=t_order).fit()
|
||||
model = pd.Series(model_fit.fittedvalues[1:], index=stock.index[1:])
|
||||
model_name = f"ARIMA {t_order}"
|
||||
|
||||
Reference in New Issue
Block a user