qri-io / starlib

qri's standard library for starlark
MIT License
114 stars 29 forks source link

need to configure DataFrame for stringification based upon terminal size #125

Closed dustmop closed 2 years ago

dustmop commented 2 years ago

This PR implements the ability for stringify to omit rows and columns when displaying a DataFrame: https://github.com/qri-io/starlib/pull/124

However, it doesn't automatically detect when the terminal size changes, or when the DataFrame is being rendered to something aside from a terminal (such as to text in an html page). Because of these use cases, the responsibility to set this size should be on the calling code that is using DataFrames. Plus, there are some constants to control how stringification works, such as how many columns to allow, where to omit from, how many spaces between columns, etc. This should also be centralized, and there should be some api for external users to let them control the display routine.

dustmop commented 2 years ago

Implemented by https://github.com/qri-io/starlib/pull/146