Skip to content

Instantly share code, notes, and snippets.

View silvermete0r's full-sized avatar
🎯
Focusing

Arman Zhalgasbayev silvermete0r

🎯
Focusing
View GitHub Profile
@silvermete0r
silvermete0r / suicide_table_parser.py
Created February 9, 2024 03:04
Parsing a List of countries by suicide rate from Wikipedia
import pandas as pd
import requests
from bs4 import BeautifulSoup
wiki_url = 'https://en.wikipedia.org/wiki/List_of_countries_by_suicide_rate'
response = requests.get(wiki_url)
soup = BeautifulSoup(response.text, 'html.parser')
table = soup.find('table', {'class': 'wikitable'})