def getIndex(filename, title):
    """Returns the index of a given column title (e.g. 'Age') within a file"""
    with open(filename, 'r') as f:
        words = f.readline().split()
        try:
            index = words.index(title)
            return index
        except ValueError:
            print('could not find title.')
            return -1
