s = Service(executable_path=r'D:\Python3104\chromedriver.exe')
driver = webdriver.Chrome(service=s)
driver.maximize_window()
url = '''http://racing.hkjc.com/racing/information/Chinese/Reports/CORunning.aspx?
Date=20220701&RaceNo=2'''
driver.get(url)
time.sleep(3)
#Got the RaceNo from URL
soup = BeautifulSoup(driver.page_source, "html.parser")
RACENo = ((driver.current_url.split("RaceNo=")[1]))
#Change the RaceNO into Series
RACENo = pd.Series(RACENo)
#Get a DataFrame From HTML
df = pd.read_html(
str(soup.find("table", class_="table_bd f_fs13")))
#Add a column to DataFrame using RACEno
df = df[:,"RaceNo": RACENo]
But it told me: DataFrame constructor not properly called! Can anyone tell me What i did wrong?