I have a column named 'market_cap_(in_us_$)' which values are like:
$5.41
$18,160.50
$9,038.20
$8,614.30
$368.50
$2,603.80
$6,701.50
$8,942.40
My final goal is to be able to filter based on specific numeric values (for example, > 2000.00).
By reading other questions in this site, I followed the instructions as:
cleaned_data['market_cap_(in_us_$)'].replace( '$', '', regex = True ).astype(float)
However, I receiving the following error
TypeError: replace() got an unexpected keyword argument 'regex'
If I remove the "regex = True" from the replace arguments, I get
ValueError: could not convert string to float: $5.41
So, what should I do?
pandasare you running? (print pd.__version__)