Posts by Nobre • 9 points
1 post
-
0
votes1
answer45
viewsQ: How to expand a dataframe based on a condition
I have the following dataframe : df = pd.DataFrame({ 'left_bound' : ['1', '4', '10', '25'], 'right_bound' : ['3', '9', '24', '50'], 'code' : ['a', 'b', 'c', 'd'], }) And I wanted to convert her to…