FunctionRacerProblemsRace

Orders in a Month

EasypandasPython

orders has columns id and date, written like "2024-03-15" (year-month-day). Return how many orders were placed in the given year and month (1 to 12), as an int.

Example 1

orders {"id":[1,2,3],"date":["2024-03-15","2024-03-01","2024-04-02"]}
year 2024
month 3
returns 2

Two orders in March 2024.

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