I have a dataframe called df['code'] which looks like this.
0 1
1 2
2 3
3 6
4 9
5 12
6 15
in which the first column are indexes and the second one is the column I wanted to convert to integers.
What I tried to do is:
for i in range(len(df['code'])):
df['code'][i] = int(df['code'][i])
which did not work. Any ideas? Thanks