Search
 
SCRIPT & CODE EXAMPLE
 

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))
Comment

PREVIOUS NEXT
Code Example
Python :: create a python3 virtual environment 
Python :: set seed train test split 
Python :: how to store in parquet format using pandas 
Python :: converting int to binary python 
Python :: pandas dataframe to parquet s3 
Python :: python check if int 
Python :: standard scaler vs min max scaler 
Python :: list to string 
Python :: how to make a list string in python 
Python :: python left rotation 
Python :: pandas select 2nd row 
Python :: ipywidget datepicker 
Python :: isnull().mean() python 
Python :: colorbar min max matplotlib 
Python :: how to add header in csv file in python 
Python :: python opencv imresize 
Python :: render template in django 
Python :: python env 
Python :: python library to make qr codes 
Python :: np.polyfit plot 
Python :: TypeError: strptime() argument 1 must be str, not Series 
Python :: python to excel 
Python :: remove extra spaces and empty lines from string python 
Python :: get range of items of python list 
Python :: python remove empty lines from file 
Python :: add two list in python 
Python :: check dir exist python 
Python :: python drop all variable that start with the same name 
Python :: list the available fonts matplotlib 
Python :: tqdm enumerate 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =