Df2 [' icratio]=df2 [' icratio] STR. Replace (' - ', '). Astype (np) float64)
System tip: could not convert a string to float:
CodePudding user response:
Tip is not converts a string to a floating-point type data, you can add a float switch in front, such as float (STR)If the answer to help you, also please give the points,,,

CodePudding user response:
Whether need to put the string into a number first, and eval is similar to that role, I don't know understand right,CodePudding user response: