0
It looks like you want to create ranges from df2 and match those against df1? # Create a range for each From/To # There's probably a better way to do this ranges = df2.assign( Range=list(map(lambda row: list(range(row[0], row[1], 5)), df2[["From", "To"]].to_numpy())) ).expl...