Here's my dataset
id value
1 100
2 50
But the value is object not integer or float
In[3]:
device_age.dtypes
Out[3]
device_id object
value object
dtype: object
I want to make it integer int
, here's what I try:
import numpy as np
device_age['value'] = device_age['value'].astype(np.int64)
and I also try
df['value'] = df['value'].astype(int)
The error message is
invalid literal for int() with base 10: 'null'