Question:
Let’s say I have a dataframe that looks like this…foo |
---|
1 |
2 |
3 |
And I want to convert the column to type
int
. I can do that easily with…foo |
---|
1.0 |
2.0 |
3.0 |
And I try to convert it from
object
to int
then I get this errorint
properly?Answer:
Just do a two step conversion, string to float then float to int.If you have better answer, please add a comment about this, thank you!