conver dtype=object to dtype int code example Example: how to change dtype object to int df['purchase'].astype(int)