This should be easy but I've got errors that I can't work out. I've got some air pollution stats for the UK that I want to parse.
https://uk-air.defra.gov.uk/data/DAQI-regional-data?regionIds%5B%5D=999&aggRegionId%5B%5D=999&datePreset=6&startDay=01&startMonth=01&startYear=2022&endDay=01&endMonth=01&endYear=2023&queryId=&action=step2&go=Next+
But using read_html results in the error:
ParserError: Error tokenizing data. C error: Expected 1 fields in line 7, saw 2
df = pd.read_html("https://uk-air.defra.gov.uk/data/DAQI-regional-data?regionIds%5B%5D=999&aggRegionId%5B%5D=999&datePreset=6&startDay=01&startMonth=01&startYear=2022&endDay=01&endMonth=01&endYear=2023&queryId=&action=step2&go=Next+")
df
This returns the data as a list. But I want to turn that list into a dataframe.
Which is the best way to solve the problem?