Convert polygon bounding box to geodataframe?
You are almost there with what you tried, and using the box
method is indeed the best way.
With the list comprehension, you can do
b = [box(l, b, r, t) for l, b, r, t in zip(df.left, df.bottom, df.right, df.top)]
Another option is to apply the box function to each row of your dataframe:
b = df.apply(lambda row: box(row.left, row.bottom, row.right, row.top), axis=1)
Once you have converted the bounding boxes to polygons, make sure to actually create a GeoDataFrame:
gdf = geopandas.GeoDataFrame(df, geometry=b)