I am attempting to truncate column values in pandas after dividing by a number. Here are the two methods I have tried:
df['new'] = int('%.0f'%(df['old']/12))
df['new'] = int(df['old']/12)
Each time I get type errors:
cannot convert the series to <class 'float'>
cannot convert the series to <class 'int'>
How can I solve this problem while avoiding these errors?