TypeError: the JSON object must be str, bytes or bytearray, not 'TextIOWrapper' code example
Example 1: python write request must be str not bytes
datafile = open(localfile, "wb")
datafile.write(page.content)
datafile.close()
Example 2: TypeError: strptime() argument 1 must be str, not Series
train['date1'] = train['ID'].apply(lambda x: datetime.strptime(x, '%Y%m%d%H'))