I have a string that looks like this:
a = "'92.345'\r\n\r\n"
a.strip()
When I try to convert it into float using np.float(a)
or just float(a)
, I get
*** Value error: could not convert string to float: '92.345'
How do I convert it cleanly to a float?