Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

convert price to float python

from re import sub
from decimal import Decimal

money = '$6,150,593.22'
value = Decimal(sub(r'[^d.]', '', money))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #convert #price #float #python
ADD COMMENT
Topic
Name
8+2 =