Generation

generate functionSat, 25 Feb 2023

rich = df[df.annual_inc >= 1000000] Rewrite the code above so that it takes into account the range from 100000 to 1000000

def rich_people(df, a, b): return df[(df.annual_inc >= a) & (df.annual_inc <= b)] rich_people(df, 100000, 1000000)

Questions about programming?Chat with your personal AI assistant