Deserialize postgres bytea in Python

The solution ended up being relatively straightforward:

data = dataframe["bytes_"][0]
bytearray = bytearray(data)

This returns a bytearray object containing the correct deserialized data from postgres.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top