Q:

python xlrd reading phone nunmber from xls becomes float

I am trying to read phonenumber field from xls using xlrd (python). But, I always get float no.
e.g. I get phone number as 8889997777.0
How can I get rid of floating format and convert it to string to store it in my local mongodb within python as string as regular phone number e.g. 8889997777

A:

You say:

python xlrd reading phone nunmber from xls becomes float

This is incorrect. It is already a float inside your xls file. xlrd reports exactly what it finds.
You can use str(int(some_float_value)) to do what you want to do.

