A swimming club keeps a member list in a CSV file with three columns: name, joined (a date written YYYY-MM-DD) and fee. The file was put together by hand, so:
25, £25, £30 with stray spaces, and sometimes a word like free or waivedTask: write fees_for_year(path, year). The starter code includes write_text(path, text), which saves CSV text to a file and returns its path. Each test passes that path straight to fees_for_year.
path with pandas.fee: remove spaces from both ends and remove the £ sign, then convert it to numbers. Anything that still can't be read becomes missing.joined into real dates.year.Return a list of two things: how many members joined in year (a whole number), and the total of their fees that could be read, rounded to 2 decimal places. A fee that couldn't be read adds nothing. If nobody joined in year, return [0, 0.0].
Every file has at least one fee written with a £ sign.