Skip to content

Commit 2ba1e1b

Browse files
jseaboldwesm
authored andcommitted
ENH: Use given name for DataFrame column name for FRED API
1 parent c6a0c4b commit 2ba1e1b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/io/data.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ def get_data_fred(name=None, start=dt.datetime(2010, 1, 1),
178178

179179
url = fred_URL + '%s' % name + \
180180
'/downloaddata/%s' % name + '.csv'
181-
data = read_csv(urllib.urlopen(url), index_col=0, parse_dates=True)
181+
data = read_csv(urllib.urlopen(url), index_col=0, parse_dates=True, header=None,
182+
skiprows=1, names=["DATE", name])
182183
return data.truncate(start, end)
183184

184185

0 commit comments

Comments
 (0)