You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improved handling of realtime parameters in get_series().
Arguments realtime_start and realtime_end in get_series() now cause a
pandas.DataFrame to be returned with pandas.MultiIndex for realtime
data. Added simple test for the new feature and documentation.
Added __init__.py in fredapi.tests so it's correctly interpreted as
a package. Now we could revert to python setup.py test in .travis.yml.
Fixed test_invalid_kwarg_in_get_series() as we sometimes get a
TypeError and sometimes a ValueError. Seems that pandas passes through
whatever exception it gets, might be a good reason for this so we
follow the same policy.
Simplified comparison of dataframe output in tests.
Copy file name to clipboardExpand all lines: README.md
+13
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,18 @@ For instance, there has been three observations (data points) for the GDP of 201
50
50
51
51
This means the GDP value for Q1 2014 has been released three times. First release was on 4/30/2014 for a value of 17149.6, and then there have been two revisions on 5/29/2014 and 6/25/2014 for revised values of 17101.3 and 17016.0, respectively.
52
52
53
+
If you pass realtime_start and/or realtime_end to `get_series`, you will get a pandas.DataFrame with a pandas.MultiIndex instead of a pandas.Series.
54
+
55
+
For instance, with observation_start and observation_end set to 2015-01-01 and
56
+
realtime_start set to 2015-01-01, one will get:
57
+
```
58
+
GDP
59
+
obs_date rt_start rt_end
60
+
2015-01-01 2015-04-29 2015-05-28 00:00:00 17710.0
61
+
2015-05-29 2015-06-23 00:00:00 17665.0
62
+
2015-06-24 9999-12-31 17693.3
63
+
```
64
+
53
65
### Get first data release only (i.e. ignore revisions)
0 commit comments