(self)
return pd.DataFrame(rows, columns=COLS + col_names)
Return transactions as a pandas DataFrame.
Return transactions as a pandas DataFrame.
Return transactions as a pandas DataFrame .
def to_frame(self):
        """
        Return transactions as a pandas DataFrame.

        """
        col_names = _column_names_from_metadata(
            t.metadata for t in self.transactions)

        def trow(t):
            return tz.concatv(
                (t.amount, t.subaccount),
                (t.metadata.get(c) for c in col_names))
        rows = [trow(t) for t in self.transactions]

        if len(rows) == 0:
            return pd.DataFrame(columns=COLS + col_names)

        return pd.DataFrame(rows, columns=COLS + col_names)
def to_frame ( self ) : col_names = _column_names_from_metadata ( t . metadata for t in self . transactions ) def trow ( t ) : return tz . concatv ( ( t . amount , t . subaccount ) , ( t . metadata . get ( c ) for c in col_names ) ) rows = [ trow ( t ) for t in self . transactions ] if len ( rows ) == 0 : return pd . DataFrame ( columns = COLS + col_names ) return pd . DataFrame ( rows , columns = COLS + col_names )