Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from datetime import datetime, timedelta
- import pandas as pd
- todday = datetime.today()
- currency_history_data = []
- for i in range(0, 200):
- delta = timedelta(days=i)
- day = todday - delta
- day = day.strftime("%Y-%m-%d")
- url = "https://rate.bot.tw/xrt.quote/" + day + "/usd/spot"
- data = pd.read_html(url)
- currency_history_data.extend(data)
- currency_df = pd.concat(currency_history_data, axis=0)
- cy = currency_df.iloc[:, 0:6]
Advertisement
Add Comment
Please, Sign In to add comment