mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-26 03:02:00 +00:00
added more user messages
This commit is contained in:
@@ -807,6 +807,7 @@ class EconomyController(BaseController):
|
||||
)
|
||||
if ns_parser:
|
||||
parameters = list_from_str(ns_parser.parameter.upper())
|
||||
|
||||
if ns_parser.query:
|
||||
query = ns_parser.query.replace(",", " ")
|
||||
df_search = fred_model.get_series_notes(search_query=query)
|
||||
@@ -817,6 +818,11 @@ class EconomyController(BaseController):
|
||||
self.fred_query = df_search["id"].head(ns_parser.limit)
|
||||
self.update_runtime_choices()
|
||||
|
||||
if parameters:
|
||||
console.print(
|
||||
"\nWarning: -p/--parameter is ignored when using -q/--query."
|
||||
)
|
||||
|
||||
return self.queue
|
||||
|
||||
if parameters:
|
||||
@@ -869,6 +875,14 @@ class EconomyController(BaseController):
|
||||
if obbff.ENABLE_EXIT_AUTO_HELP:
|
||||
self.print_help()
|
||||
|
||||
else:
|
||||
console.print("[red]No data found for the given Series ID[/red]")
|
||||
|
||||
elif not parameters and ns_parser.raw:
|
||||
console.print(
|
||||
"Warning: -r/--raw should be combined with -p/--parameter."
|
||||
)
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def call_index(self, other_args: List[str]):
|
||||
"""Process index command"""
|
||||
|
||||
@@ -236,15 +236,12 @@ def get_aggregated_series_data(
|
||||
}
|
||||
|
||||
for s_id in series_ids:
|
||||
data = pd.concat(
|
||||
[
|
||||
data,
|
||||
pd.DataFrame(
|
||||
get_series_data(s_id, start_date, end_date), columns=[s_id]
|
||||
),
|
||||
],
|
||||
axis=1,
|
||||
)
|
||||
|
||||
series = pd.DataFrame(
|
||||
get_series_data(s_id, start_date, end_date), columns=[s_id]
|
||||
).dropna()
|
||||
|
||||
data[s_id] = series[s_id]
|
||||
|
||||
return data, detail
|
||||
|
||||
|
||||
Reference in New Issue
Block a user