@classmethod
def from_df(cls, df: object) ->dict:
    """Constructs a dictionary of sections keyed by the section.ids from a Pandas dataframe."""
    sections = {}
    for index, section_series in df.iterrows():
        sid = section_series['sid']
        sections[sid] = cls.from_series(section_series)
    return sections
