Python convert string to float error with negative numbers
Your string contains a unicode en-dash, not an ASCII hyphen. You could replace it:
>>> float('–1123.04'.replace('\U00002013', '-'))
-1123.04
Your string contains a unicode en-dash, not an ASCII hyphen. You could replace it:
>>> float('–1123.04'.replace('\U00002013', '-'))
-1123.04