Greetings,
You can see a block of code to get the data from EXPORT API via Python, above. Response’s status code is “200”.
I want to open the file in Python to use it via Pandas and make some manipulations. However, I cannot read it. I have used the code below but it created a file in my Desktop:
z = zipfile.ZipFile(io.BytesIO(res.content))
z.extractall()
I simply used the pd.read_json() as in below:
pd.read_json(z.open(f'{z.namelist().-1]}'))
But it returned an error below:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte
How can I solve this problem?