python讀取excel時,數字自動轉化爲float

xlrd模塊去讀excel時會將數字類型的自動轉化爲浮點數,這是一個小坑。在網上查了一下,該模塊的做者也說過Excel treats all numbers as floats. In general, it doesn't care whether your_number % 1 == 0.0 is true or not。 咱們能夠簡單的判斷讀取的是否是數字,而後將其轉化爲inthtml #
相關文章
相關標籤/搜索