Thanks for replying - I'm really new at this.
sample data:
Name Team Year Event Medal
Christian Mayer Austria 1998 Alpine Skiing Men's Combined Bronze
Mario Reiter Austria 1998 Alpine Skiing Men's Combined Gold
Josef Polig Italy 1992 Alpine Skiing Men's Combined Gold
Harald Christian Strand Nilsen Norway 1994 Alpine Skiing Men's Combined Bronze
what I've done so far - here, I'm also trying to filter by year and/or country, and then I get the error; I'm certain I'm missing something obvious.
import argparse
from argparse import ArgumentParser
parser = argparse.ArgumentParser()
parser.add_argument('-f')
parser.add_argument('-y', action='store_true')
parser.add_argument('-c', action='store_true')
args = parser.parse_args()
# Select include year and country from arguments
selection = input('Please input year and/or country:')
usecols = selection([])
if args.y: usecols.append('Year')
if args.c: usecols.append('Country')
# Read the file in the f argument with the specified columns.
year_country = december_project(args.f, usecols=usecols)