HK3-Lab-Team / pytrousse

PyTrousse collects into one toolbox a set of data wrangling procedures tailored for composing reproducible analytics pipelines.
Apache License 2.0
0 stars 1 forks source link

Add __eq__ method to DataFrameWithInfo class #16

Open lorenz-gorini opened 4 years ago

lorenz-gorini commented 4 years ago

The method should simply compare each attribute and pandas DataFrame (which requires something different). For example:

    comparable_attrs = self.__dict__.keys() - {"df"}
    for k in comparable_attrs:
        assert self.__dict__[k] == other.__dict__[k]
    assert self.df.equals(other.df)