FunctionRacerProblemsRace

Weekday Counts

EasypandasPython

events has a column date written like "2024-03-15". Return a dictionary mapping the weekday name ("Monday", "Tuesday", ...) to how many events fall on that weekday. Only weekdays that occur are included.

Example 1

events {"date":["2024-03-15","2024-03-22","2024-03-16"]}
returns {"Friday":2,"Saturday":1}

15 and 22 March 2024 are Fridays; the 16th is a Saturday.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More pandas problems