So, I'm a rookie at web scrapping and Python in general, and I'm having quite a hard time learning it. I'm trying to get some data from a csv file, but so far I could only split lines and columns. I don't have the slightest idea of how I'm supposed to proceed from now on.
From a certain CSV file, I'm supposed to say which Scandinavian country (Sweden, Norway and Denmark) won the most gold medals in the following categories: curling, skating, skiing and ice hokey, starting from year 2001.
Here's what I've managed to do so far:
import requests from bs4 import BeautifulSoup url = "https://sites.google.com/site/dr2fundamentospython/arquivos/Winter_Olympics_Medals.csv" # Usando requests csv = requests.get(url).text lines = csv.splitlines() for l in range(1, len(lines)): columns = lines[l].split(',') print(columns)
Any comments will be greatly appreciated