Algorithm

    0

    0

    nadine 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)
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.