Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23276

Web Scraping 2nd Table Player Stats from FBRef?

$
0
0

Was hoping for help here. I'm trying to web scrape this second table of player goal and shot creation stats on FB Ref for the MLS, but my script is bringing in the first table of team statistics instead. Can someone help? Code below.

URL: https://fbref.com/en/comps/22/stats/Major-League-Soccer-Stats

libraries

import pandas as pd

fbref table link

url_df = 'https://fbref.com/en/comps/22/gca/Major-League-Soccer-Stats'

df = pd.read_html(url_df)

df


Viewing all articles
Browse latest Browse all 23276

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>