运行 ❯
获得您自己的
Python
服务器
×
更改方向
更改主题,深色/浅色
前往 Spaces
import pandas as pd data = { "Duration": [50, 40, 45], "Pulse": [109, 117, 110], "Calories": [409.1, 479.5, 340.8] } df = pd.DataFrame(data) newdf = df.astype('int64') print(newdf) #Notice that the 'Calories' has changed from float to int
Duration Pulse Calories 0 50 109 409 1 40 117 479 2 45 110 340