0
0
nanadine afifi
The code first fetches the month from the dataframe. It then checks if the input is either "day" or "all", and if it is, the code uses the get_day() function to get the day of the month. The code then loops through all the days in the dataframe, getting the value for each one.
Library: numpy
def get_filters (df):
while month not in months:
month = get month input
if filter == "day" or filter == "all":
day = get day input
while day not in days:
day = get a valid input
return (city, month, day)