0
我正在閱讀熊貓教程,並遇到了我以前沒見過的東西。整數後有一個小數點。python熊貓:整數後的小數點?
下面是與鏈接到教程要點:https://gist.github.com/findjashua/82717d2f3261a92ce528
什麼是整數小數點後的目的?
我正在閱讀熊貓教程,並遇到了我以前沒見過的東西。整數後有一個小數點。python熊貓:整數後的小數點?
下面是與鏈接到教程要點:https://gist.github.com/findjashua/82717d2f3261a92ce528
什麼是整數小數點後的目的?
我認爲它只是使它float
代替int
如下圖所示:
In [1]: type(5)
Out[1]: int
In [2]: type(5.)
Out[2]: float
看看該系列的D型:包括小數點使它成爲浮動。 – Marius 2014-12-01 23:30:58
Float vs Int。在這種情況下沒有特別的原因。 – elyase 2014-12-01 23:57:36