For the sake of those who finds this thread -- the date / value pairs can be printed by the following:
import fred fred.key(fredKey) gnpObvs = fred.observations('GNPCA') for i in range(1, len(gnpObvs['observations']['observation'])): print gnpObvs['observations']['observation'][i]['date'], gnpObvs['observations']['observation'][i]['value'] mj On 24 February 2013 10:51, Matthew Johnson <mcoog...@gmail.com> wrote: > Thanks very much; hopefully that's the boost i need to get rolling. > > Best regards > > matt > > On 24/02/2013, at 10:40 AM, Robert Sjoblom <robert.sjob...@gmail.com> wrote: > >>> I am fairly sure i am querying the FRED API, but i am unsure how to >>> _access and use_ the dict objects that it is returning. For example, >>> how would i just print out values? >> >> If it's a dict object, the standard dictionary behavior and methods >> should work. I've not looked closely at the FRED API, but something >> like (untested): >> for key in dictionary: >> print(key, dictionary[key]) >> >> could possibly get you started. >> >> -- >> best regards, >> Robert S. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor