dataframe icon indicating copy to clipboard operation
dataframe copied to clipboard

`renderToString` extension method is `internal`, making it difficult to write a humanized string representation to non-stdout

Open henrylegrys opened this issue 8 months ago • 0 comments

AnyFrame#renderToString is internal and only exposed via the print extension method. This method appears to be the only way to customize the parameters of renderToString - in the other places it is exposed, for example DataFrame#toString, there is no way to pass custom arguments.

In my application I have a custom Appendable that I want to print the formatted representation to instead - currently this appears to be impossible.

Would it be possible to either:

  • change renderToString's visibility to public, allowing for applications to write it to other streams; or
  • add another extension method similar to print, but which can specify an Appendable as the target?

I suppose there are also some open questions about terminal capabilities (in the case of outputting to a terminal) - for example, not all terminals have Unicode support, and therefore might not support the crop symbols used for table borders. Perhaps some kind of TTY-aware interface could be added?

henrylegrys avatar Apr 16 '25 10:04 henrylegrys