pandas convert the datatype from int64 to int 8 code example Example: object to int64 pandas >>> df['purchase'].astype(str).astype(int)