I am attempting to research what I need to learn thru this existing SO post about reading thru pandas (or better method?) values for an hourly weather query from weather bug. Thru the weather bug website if I enter in a zip code or city I can retrieve 12 hours of future hourly weather data.
How would I put just the temperature data in a pandas dataframe? (1 column with 12 rows representing hour 1 thru 12)?
Thank you for any tips sorry not a lot of wisdom here..
import requests
url = 'https://www.weatherbug.com/weather-forecast/hourly/san-francisco-ca-94103'
header = {
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36",
"X-Requested-With": "XMLHttpRequest"
}
r = requests.get(url, headers=header)
dfs = pd.read_html(r.text)
If I run this, I will get an error
ValueError: No tables found