python, how do I convert a text like 8532697 to a numeric type 8532697?
for example:
a = "8532697"
tried astype (float) and int (a) could not be converted successfully.
python, how do I convert a text like 8532697 to a numeric type 8532697?
for example:
a = "8532697"
tried astype (float) and int (a) could not be converted successfully.
int ("8532697" .replace (',',')
if you want to convert to float type, use float ('8532697'.replace (',',')). If it is int type, just change the preceding float to int
.