mercredi 15 juin 2016

Django store csv float items in database


I have a csv file with data like:

Company,104.95,102.8,102.6,104.5,104.5,102.75...n etc.

I am storing float values like this prices[1:len(prices)] in

models.CommaSeparatedIntegerField(blank=True, null=True, max_length=10000)

but after the values are stored, the float values get quotes like '104.95','102.8','102.6','104.5','104.5','102.75'

Whereas I want to store the values as floats, not as strings. How to achieve that?


Aucun commentaire:

Enregistrer un commentaire