mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-29 05:21:48 +00:00
Fix 3202 (#3213)
* fix(docs): added margin between sections * fix: small typo Co-authored-by: Chavithra <chavithra@gmail.com>
This commit is contained in:
@@ -865,21 +865,14 @@ def display_raw(
|
||||
Export data as CSV, JSON, XLSX
|
||||
"""
|
||||
|
||||
export_data(
|
||||
export,
|
||||
os.path.dirname(os.path.abspath(__file__)),
|
||||
"history",
|
||||
data,
|
||||
)
|
||||
|
||||
if isinstance(data, pd.Series):
|
||||
df1 = pd.DataFrame(data)
|
||||
else:
|
||||
df1 = data.copy()
|
||||
|
||||
if sortby:
|
||||
df1 = data.sort_values(
|
||||
by=sortby if sortby != "AdjClose" else "Adj Close", ascending=descend
|
||||
df1 = df1.sort_values(
|
||||
by=sortby if sortby != "AdjClose" else "Adj Close", ascending=not descend
|
||||
)
|
||||
df1.index = [x.strftime("%Y-%m-%d") for x in df1.index]
|
||||
|
||||
@@ -891,6 +884,13 @@ def display_raw(
|
||||
floatfmt=".3f",
|
||||
)
|
||||
|
||||
export_data(
|
||||
export,
|
||||
os.path.dirname(os.path.abspath(__file__)),
|
||||
"raw",
|
||||
data,
|
||||
)
|
||||
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_line(
|
||||
|
||||
@@ -268,7 +268,7 @@ class QaController(CryptoBaseController):
|
||||
qa_view.display_raw(
|
||||
data=self.data[self.target],
|
||||
limit=ns_parser.limit,
|
||||
sortby="",
|
||||
sortby="Close",
|
||||
descend=ns_parser.descend,
|
||||
export=ns_parser.export,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user