I am working on aggregating the contents of a dataframe based on the range of values in a given column. My df looks like given below:
min max names
1 5 ['a','b']
0 5 ['d']
6 8 ['a','c']
3 4 ['e','a']
The output expected is
- for
min=0andmax=5, get the aggregated value, so the names value will be['a','b','d','e','a'] - for
min=5andmax=10, get the aggregated value, the names value will be['a','d']
Any help is appreciated.