I am trying to scrape table data from this Wikipedia page: https://en.wikipedia.org/wiki/2020_coronavirus_pandemic_in_Nepal I've tried using pandas pd.read_html syntax but it doesn't work for the table I'm trying to scrape (Confirmed COVID-19 cases in Nepal by district).
I tried using Beautifulsoup and pandas to scrape the data, but it doesn't work
url = 'https://en.wikipedia.org/wiki/2020_coronavirus_pandemic_in_Nepal'
r = requests.get(url)
soup = BeautifulSoup(r.text,'html.parser')
table = soup.find('table', {'class': 'wikitable'})
dfs=pd.read_html(table)
dfs[0]