SQLite Forum

Integer becomes blob
Login
Since solution was not posted, I will post it, since I ran into the same problem today. Using Python & Pandas.

For some reason, Sqlite does not accept INT larger than 8 byte if it is coming from Numpy which Pandas uses.

Solution is, to use these two lines:

>sqlite3.register_adapter(np.int32, int)

>sqlite3.register_adapter(np.int64, int)

Also, not as great solution, but converting number to REAL before inserting it, would also work ;-)

p.s.

I found solution and explanation here:

https://stackoverflow.com/questions/49456158/integer-in-python-pandas-becomes-blob-binary-in-sqlite