I saw a talk by Jack Diederich a few weeks ago titled "[Stop Writing Classes](https://www.youtube.com/watch?v=o9pEzgHorH0)" and noticed that some of my code perhaps echoes what he argues against (to the effect of "classes with two methods, one of which is `__init__`") in my code. For some parser that needed to run through a bunch of data, I created a couple classes that implement a single method to extract the salient information and tack it on to the end.

```
class DataFrameBuilder(object):
    column_order = None
    def __init__(self):
        self.data = []

    def render(self):
        return pd.DataFrame(self.data, columns=self.column_order)

class BoundsBuilder(DataFrameBuilder):
    data_type = 'bounds'
    column_order = ['bid', 'x_min', 'x_max', 'y_min', 'y_max']

    def append(self, bid, blob):
        centroid_x, centroid_y = zip(*blob['centroid'])
        self.data.append({'bid': bid,
                'x_min': min(centroid_x), 'x_max': max(centroid_x),
                'y_min': min(centroid_y), 'y_max': max(centroid_y),
            })
...

def summarize(experiment):
    builders = [BoundsBuilder(), TerminalsBuilder(), SizeBuilder()]

    for bid, blob in experiment.blobs():
        for builder in builders:
            builder.append(bid, blob)

    return {builder.data_type: builder.render() for builder in builders}

```

I could do the same thing with a couple of dictionaries to store my results and attributes, along with bare functions I pass said dictionary (or value within it), it might even be a few less lines, so I don't know if I'm over-using classes here or not.

My example here is fairly small, but that's why it's here, because they are my smallest classes and perhaps on the edge of usefulness/overkill.