from re import sub from decimal import Decimal money = '$6,150,593.22' value = Decimal(sub(r'[^d.]', '', money))
# Method 1: float_number = float (decimal_number) # Method 2: float_number = decimal_number * 1.0