Import Json web data source to xls or csv

Peter Otten __peter__ at web.de
Thu Feb 21 09:36:07 CET 2013


rusi wrote:

> On Feb 20, 6:54 am, Michael Herman <herma... at gmail.com> wrote:
>> c = csv.writer(f)
>> c.writerow([str(d["currency"]),str(d["symbol"]),str(d["bid"]),
>> str(d["ask"]),str(d["currency_volume"])])

> Tried it with and without the str and there are small differences.

The actual differences: float values are converted using repr() instead of 
str(), None values are converted to the empty str "". 
Both special cases make sense to me. So
 
> Why do you use the str?





More information about the Python-list mailing list