I succeeded to parse url into LIST format, but somehow when I use pd.DataFrame() all the data resets. Can you please help me where I get wrong?
These are what I've scraped:
#currency
URL = "https://www.xe.com/currencytables/?from=USD&date=2019-05-01"
data = requests.get(URL).text
#parse url
soup = bs(data, "html.parser")
#find the tables you want
table = soup.findAll("table")[0:1]
#read it into pandas
FXrate = pd.read_html(str(table))
FXrate
and this works.
Problem occurs when:
FXrate = pd.DataFrame(FXrate)
FXrate
From what I've known, I just converted format from list to DataFrame, but somehow the whole table doesn't come up well.