edgartools icon indicating copy to clipboard operation
edgartools copied to clipboard

Speed up Statement.to_dataframe()

Open mpreiss9 opened this issue 1 week ago • 0 comments

Feature Category

  • [X] New API functionality
  • [X] Performance improvement
  • [ ] Developer experience improvement
  • [ ] Documentation enhancement
  • [ ] Tool/utility addition

Problem Statement

Statement.to_dataframe() is quite slow. profiling shows that this is primarily due to line 1257: df = self._add_metadata_columns(df).

Who would benefit from this feature?

  • [ ] Beginner Python users working with SEC filings
  • [ ] Financial analysts and researchers
  • [X] Advanced developers building financial applications
  • [ ] Data scientists working with financial datasets

Proposed Solution

Add a parameter to to_dataframe() to make _add_metadata() optional. It's not required for every use case. Default can remain True to maintain backwards compatibility

Implementation Considerations

Complexity Level:

  • [X] Simple (minor API addition)
  • [ ] Moderate (new functionality with existing patterns)
  • [ ] Complex (significant architectural changes)

Backwards Compatibility:

  • [X] This feature maintains backwards compatibility
  • [ ] This feature might break existing code (please explain below)
  • [ ] Unsure about compatibility impact

Additional Context

Add any other context, screenshots, or examples about the feature request here.

Related Issues/Features:


Feature requests are evaluated based on EdgarTools' core principles: Simple yet powerful, accurate financials, beginner-friendly, and joyful UX.

mpreiss9 avatar Nov 22 '26 19:11 mpreiss9