Fix economy/fred start date (#2421)

* limit was cropping data

* pylint

* boop

* fix limit
This commit is contained in:
James Maslek
2022-08-26 06:30:42 -04:00
committed by GitHub
parent c341f46aac
commit 1d73e7c192
3 changed files with 4 additions and 9 deletions

View File

@@ -210,4 +210,4 @@
"polygon"
]
}
}
}

View File

@@ -186,7 +186,7 @@ def get_series_data(
@log_start_end(log=logger)
def get_aggregated_series_data(
series_ids: List[str], start_date: str = None, end_date: str = None, limit: int = -1
series_ids: List[str], start_date: str = None, end_date: str = None
) -> pd.DataFrame:
"""Get Series data. [Source: FRED]
Parameters
@@ -197,8 +197,6 @@ def get_aggregated_series_data(
Start date to get data from, format yyyy-mm-dd
end_date : str
End data to get from, format yyyy-mm-dd
limit: int
Number of raw data rows to show
Returns
----------
@@ -229,9 +227,6 @@ def get_aggregated_series_data(
axis=1,
)
if limit != -1:
data = data.tail(limit)
return data, detail

View File

@@ -104,7 +104,7 @@ def display_fred_series(
"""
data, detail = fred_model.get_aggregated_series_data(
series_ids, start_date, end_date, limit
series_ids, start_date, end_date
)
if data.empty:
@@ -159,7 +159,7 @@ def display_fred_series(
if raw:
print_rich_table(
data,
data.tail(limit),
headers=list(data.columns),
show_index=True,
index_name="Date",