code to covert all object dtype into int code example Example: how to change dtype object to int df['purchase'].astype(int)