mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-26 03:02:00 +00:00
minor adjustments
This commit is contained in:
@@ -20,7 +20,7 @@ class OpenBBFigureTable(OpenBBFigure):
|
||||
def show(
|
||||
self,
|
||||
show_index: Optional[bool] = True,
|
||||
index_name: Optional[str] = "",
|
||||
index_name: Optional[str] = "date",
|
||||
headers: Optional[Union[List[str], pd.Index]] = None,
|
||||
title: Optional[str] = "",
|
||||
source: Optional[str] = "",
|
||||
|
||||
@@ -564,28 +564,29 @@ class StocksController(StockBaseController):
|
||||
if c_out.error:
|
||||
console.print(f"[red]{c_out.error}[/]\n")
|
||||
else:
|
||||
# sheet_name = (
|
||||
# " ".join(ns_parser.sheet_name) if ns_parser.sheet_name else None
|
||||
# )
|
||||
# export = ns_parser.export if ns_parser.export else None
|
||||
sheet_name = (
|
||||
" ".join(ns_parser.sheet_name) if ns_parser.sheet_name else None
|
||||
)
|
||||
export = ns_parser.export if ns_parser.export else None
|
||||
|
||||
# print_rich_table(
|
||||
# df=c_out.to_dataframe(),
|
||||
# show_index=True,
|
||||
# title="News",
|
||||
# index_name="Date",
|
||||
# export=bool(export),
|
||||
# )
|
||||
# export_data(
|
||||
# export_type=export,
|
||||
# dir_path=os.path.dirname(os.path.abspath(__file__)),
|
||||
# func_name="news",
|
||||
# df=c_out.to_dataframe(),
|
||||
# sheet_name=sheet_name,
|
||||
# )
|
||||
print_rich_table(
|
||||
df=c_out.to_dataframe(),
|
||||
show_index=True,
|
||||
title="News",
|
||||
index_name="Date",
|
||||
export=bool(export),
|
||||
print_to_console=not ns_parser.chart,
|
||||
)
|
||||
export_data(
|
||||
export_type=export,
|
||||
dir_path=os.path.dirname(os.path.abspath(__file__)),
|
||||
func_name="news",
|
||||
df=c_out.to_dataframe(),
|
||||
sheet_name=sheet_name,
|
||||
)
|
||||
|
||||
if ns_parser.chart:
|
||||
c_out.show()
|
||||
# if ns_parser.chart:
|
||||
# c_out.show()
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def call_multiples(self, other_args: List[str]):
|
||||
@@ -604,28 +605,29 @@ class StocksController(StockBaseController):
|
||||
if c_out.error:
|
||||
console.print(f"[red]{c_out.error}[/]\n")
|
||||
else:
|
||||
# sheet_name = (
|
||||
# " ".join(ns_parser.sheet_name) if ns_parser.sheet_name else None
|
||||
# )
|
||||
# export = ns_parser.export if ns_parser.export else None
|
||||
sheet_name = (
|
||||
" ".join(ns_parser.sheet_name) if ns_parser.sheet_name else None
|
||||
)
|
||||
export = ns_parser.export if ns_parser.export else None
|
||||
|
||||
# print_rich_table(
|
||||
# df=c_out.to_dataframe(),
|
||||
# show_index=True,
|
||||
# title=f"Multiples",
|
||||
# index_name="Metric",
|
||||
# export=bool(export),
|
||||
# )
|
||||
# export_data(
|
||||
# export_type=export,
|
||||
# dir_path=os.path.dirname(os.path.abspath(__file__)),
|
||||
# func_name="multiples",
|
||||
# df=c_out.to_dataframe(),
|
||||
# sheet_name=sheet_name,
|
||||
# )
|
||||
print_rich_table(
|
||||
df=c_out.to_dataframe(),
|
||||
show_index=True,
|
||||
title=f"Multiples",
|
||||
index_name="Metric",
|
||||
export=bool(export),
|
||||
print_to_console=not ns_parser.chart,
|
||||
)
|
||||
export_data(
|
||||
export_type=export,
|
||||
dir_path=os.path.dirname(os.path.abspath(__file__)),
|
||||
func_name="multiples",
|
||||
df=c_out.to_dataframe(),
|
||||
sheet_name=sheet_name,
|
||||
)
|
||||
|
||||
if ns_parser.chart:
|
||||
c_out.show()
|
||||
# if ns_parser.chart:
|
||||
# c_out.show()
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def call_disc(self, _):
|
||||
|
||||
Reference in New Issue
Block a user