Need help to write an bin packing optimization problem using pulp

Job ID: 34468166

Budget: ₹2,000 – ₹3,000 INR

The dataset has the item, length of the item, and weight of the item as shown below :
df_updated = pd.DataFrame([['item1', 10, 'A'], ['item2', 20, 'B'],  ['item3', 20, 'C'], ['item4', 20, 'B'], ['item5',10, 'A'], ['item6',10, 'B']], columns = ['itemname', 'QuantityToGroup', 'Length'])

The requirement is to use minimum bins with minimum wastage following the length constraint.
Length constraints can be flexible, meaning they can be violated to optimize wastage on bins.

The solution has to be designed in a Python pulp optimization package.
Related categories: Python Machine Learning (ML)