Skip to content

Consider MatRepr for __repr__ instead of Pandas #494

Description

@alugowski

https://pypi.org/project/matrepr/

Benefits:

  • output looks like a matrix, not a dataframe
  • faster, especially on first run where the pandas import is slow
  • small code

See it in action with python-graphblas:
https://nbviewer.org/github/alugowski/matrepr/blob/main/doc/demo-python-graphblas.ipynb

To try yourself, use matrepr's jupyter integration (causes Jupyter to use matrepr's formatter instead of the native one):

import matrepr.jupyter

For the Python REPL, a __repr__ monkey patch does the same:

import matrepr.patch.graphblas

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions