Skip to content

Consider MatRepr for __repr__ instead of Pandas #494

Open
@alugowski

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

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy