-
Notifications
You must be signed in to change notification settings - Fork 0
Home
ryansherby edited this page Jan 13, 2023
·
8 revisions
from bls_transformer import BLS
bls = BLS.API(series_id=[<YOUR SERIES ID(S)>],*)
To show the raw JSON dictionary, use bls.json_response
. Otherwise, proceed with the command bls.transform_json()
to initialize the data dictionary.
df = bls.get_DataFrame(id=[<YOUR SERIES ID(S)>],index=[<INDEX(S)>],catalog_value=None,axis=1)
- Returns a DataFrame concatenated on the Series ID of each individual DataFrame.
- A DataFrame's index is the same as the order in which the Series it corresponds to was initialized, starting at zero.
- The
catalog_value
chosen will replace the Series ID for each individual DataFrame. - The
axis
represents the direction the aggregate DataFrame will be concatenated on. 0 is vertical (index), 1 is horizontal (columns). - The first DataFrame requested will always possess the 'Period' key concatenated on. This will lead to odd results if DataFrames with different periods (e.g., monthly/quarterly) are concatenated within the same
get_DataFrame()
request.
catalog = bls.get_catalog(id=[<YOUR SERIES ID(S)>],index=[<INDEX(S)>])
- Returns a list of JSON dictionaries containing information about the requested Series.
- A catalog's index is the same as the order in which the Series it corresponds to was initialized, starting at zero.