Run ❯
Get your
own Python
server
×
Change Orientation
Change Theme, Dark/Light
Go to 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