-
Notifications
You must be signed in to change notification settings - Fork 0
Home
ryansherby edited this page Jan 5, 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>],axis=<DEFAULT=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 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>])
- 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.