Hint
Start by downloading the CSV data from the URL using the requests
module:
import requests
url = "https://pythonhow.com/media/django-summernote/2024-04-19/b24fcd3d-fc39-4891-8c53-71e7393fa5ac.csv"
response = requests.get(url)
data = response.content.decode("utf-8")
Now think: how can you convert this CSV string into something Python can work with? If you're using the csv
module, try:
import csv
reader = csv.DictReader(data.splitlines())
If you're using pandas
, it’s even simpler:
import pandas as pd
df = pd.read_csv(url)
Then use input()
to ask the user for a name, and search the data with a case-insensitive comparison.