format_lifetime_table

Documentation for eth_defi.research.vault_metrics.format_lifetime_table function.

format_lifetime_table(df, add_index=False, add_address=False, add_share_token=False, drop_blacklisted=True, profit_presentation='split', html_links=False)

Format table for human readable output.

See calculate_lifetime_metrics()

Parameters
  • add_index – Add 1, 2, 3… index column

  • add_address

    Add address as a separate column.

    For vault address list copy-pasted.

  • drop_blacklisted – Remove vaults we have manually flagged as troublesome.

  • html_links

    Wrap Name, Chain, and Protocol values in <a> tags linking to tradingstrategy.ai. Use display_lifetime_table() to render the result with compact styling in a Jupyter notebook.

    Example:

    from eth_defi.research.vault_metrics import (
        format_lifetime_table,
        display_lifetime_table,
    )
    
    formatted = format_lifetime_table(df, html_links=True)
    display_lifetime_table(formatted)
    

  • df (pandas.DataFrame) –

  • profit_presentation (Literal['split', 'net_only']) –

Returns

Human readable data frame

Return type

pandas.DataFrame