Exemple #1
0
 def test_bls_industry(self):
     data = make_data(["IPUUN8111__L000"])
     result = parse_data(fetch_data(data)).head(1)
     expected = pd.DataFrame([99.718], columns=["IPUUN8111__L000"])
     expected.index = pd.to_datetime(['2003-01-01'])
     expected.index.name = 'stamp'
     expected.columns.name = 'series_id'
     tm.assert_frame_equal(result, expected)
Exemple #2
0
 def test_bls_industry(self):
     data = make_data(["IPUUN8111__L000"])
     result = parse_data(fetch_data(data)).head(1)
     expected = pd.DataFrame([99.718], columns=["IPUUN8111__L000"])
     expected.index = pd.to_datetime(['2003-01-01'])
     expected.index.name = 'stamp'
     expected.columns.name = 'series_id'
     tm.assert_frame_equal(result, expected)
Exemple #3
0
 def test_bls_quarter(self):
     data1 = json.dumps({"seriesid": ["PRS85006093", "PRS85006153"],
                         "startyear": "1994", "endyear": "2004"})
     result = parse_data(fetch_data(data1)).head(1)
     expected = pd.DataFrame({'PRS85006093': [69.303],
                              'PRS85006153': [81.559]})
     expected.index = pd.to_datetime(['1994-01-01'])
     expected.index.name = 'stamp'
     expected.columns.name = 'series_id'
     tm.assert_frame_equal(result, expected)
Exemple #4
0
 def test_bls_quarter(self):
     data1 = json.dumps({
         "seriesid": ["PRS85006093", "PRS85006153"],
         "startyear": "1994",
         "endyear": "2004"
     })
     result = parse_data(fetch_data(data1)).head(1)
     expected = pd.DataFrame({
         'PRS85006093': [69.303],
         'PRS85006153': [81.559]
     })
     expected.index = pd.to_datetime(['1994-01-01'])
     expected.index.name = 'stamp'
     expected.columns.name = 'series_id'
     tm.assert_frame_equal(result, expected)