Reputation: 23
url = 'https://api.misoenergy.org/MISORTWDDataBroker/DataBrokerServices.asmx?messageType=getace&returnType=json'
pd.read_json(url)
ValueError: Expected object or value
pd.read_json(url, lines= True)
TypeError: initial_value must be str or None, not bytes
json sample:
{"MktDay":"11-19-2020","RefId":"19-Nov-2020 - Interval 14:10:00 EST","ACE":[{"instantEST":"2020-11-19 12:10:30 PM","value":"-60.95"},{"instantEST":"2020-11-19 12:11:00 PM","value":"172.85"},{"instantEST":"2020-11-19 12:11:30 PM","value":"344.70"}
Upvotes: 0
Views: 67
Reputation: 5648
Both of your examples worked for me.
you can try this as an option:
import requests
data = requests.get('https://api.misoenergy.org/MISORTWDDataBroker/DataBrokerServices.asmx?messageType=getace&returnType=json')
pd.read_json(data.text)
Upvotes: 1