0

idc04=[int(i) for i in dc04]

The dc04 is a list with str entries and the values are in the form of 2,234,975 etc. I wanted to convert the entire list in the int or float format but the values seem too big for the data type. Since double cannot be used here, what should I do?

This is the error I am getting

  • Please paste the _text_ of your code & the error message into your question, using code blocks to preserve formatting. See [Why may I not upload images of code on SO when asking a question?](http://meta.stackoverflow.com/questions/285551/why-may-i-not-upload-images-of-code-on-so-when-asking-a-question) – PM 2Ring Jan 24 '17 at 08:24
  • Short answer: Python number strings cannot contain commas. But you can use string methods to get rid of the commas before you attempt to convert the string to a number.. – PM 2Ring Jan 24 '17 at 08:25

0 Answers0