# Ceteris Lab downloadable Python script
# Course: Fundamentals of Python for Financial Econometrics

from io import StringIO
import pandas as pd

frozen_csv = StringIO("""date,FXUSDCAD
2024-04-15,1.3762
2024-04-16,1.3778
2024-04-17,1.3731
2024-04-18,1.3704
2024-04-19,1.3746
""")
fx = pd.read_csv(frozen_csv, parse_dates=["date"])
print(fx.shape[0], round(fx["FXUSDCAD"].mean(), 4))

source_url = "https://www.bankofcanada.ca/valet/observations/FXUSDCAD/json"
print("Official Bank of Canada endpoint:", source_url)
print("This browser lab uses the frozen five-observation sample above for reproducibility.")
