@staticmethod
def from_pandas(df, index=True):
    """Return a reader object which will iterate over records in
        the pandas.DataFrame *df*.

        .. note::

            This constructor requires the optional, third-party
            library pandas.
        """
    if index:
        yield list(df.index.names) + list(df.columns)
    else:
        yield list(df.columns)
    records = df.to_records(index=index)
    for record in records:
        yield list(record)
