def make_transaction_frame(transactions):
transaction_list = []<EOL>for dt in transactions.index:<EOL><INDENT>txns = transactions.loc[dt]<EOL>if len(txns) == <NUM_LIT:0>:<EOL><INDENT>continue<EOL><DEDENT>for txn in txns:<EOL><INDENT>txn = map_transaction(txn)<EOL>transaction_list.append(txn)<EOL><DEDENT><DEDENT>df = pd.DataFrame(sorted(transaction_list, key=lambda x: x['<STR_LIT>']))<EOL>df['<STR_LIT>'] = -df['<STR_LIT>'] * df['<STR_LIT>']<EOL>df.index = list(map(pd.Timestamp, df.dt.values))<EOL>return df<EOL>
Formats a transaction DataFrame.

Parameters
----------
transactions : pd.DataFrame
    Contains improperly formatted transactional data.

Returns
-------
df : pd.DataFrame
    Daily transaction volume and dollar ammount.
     - See full explanation in tears.create_full_tear_sheet.