kosiew opened a new pull request, #1086:
URL: https://github.com/apache/datafusion-python/pull/1086

   ## Which issue does this PR close?
   
   Partial fix for #1078
   
   ## Rationale for this change
   
   This PR adds configurable display settings for `DataFrame` representations 
in the Python bindings of DataFusion. These changes improve flexibility and 
control over how DataFrames are visualized, especially in interactive 
environments like Jupyter notebooks. Users can now fine-tune memory usage, cell 
truncation behavior, and row limits for both string and HTML representations.
   
   ## What changes are included in this PR?
   
   - Introduced a new `DisplayConfig` Python class to encapsulate display 
settings.
   - Extended `PyDataFrame` to store and expose `DisplayConfig` via a new 
`display_config` property.
   - Added `configure_display()` and `reset_display_config()` methods to allow 
users to modify or reset configuration.
   - Updated DataFrame display logic (`__repr__` and `_repr_html_`) to respect 
the active configuration.
   - Modified Rust backend to pass `DisplayConfig` to relevant formatting 
functions.
   - Added extensive unit tests in `test_dataframe.py` to validate:
     - Custom configuration values
     - Invalid input handling
     - Display behavior for large cells, large tables, and row limits
   
   ## Are there any user-facing changes?
   
   Yes. This PR introduces:
   
   - `df.display_config`: Property to access current display configuration.
   - `df.configure_display(...)`: Method to customize display settings.
   - `df.reset_display_config()`: Method to reset to default configuration.
   - More intuitive and memory-conscious display formatting in notebook and 
terminal environments.
   
   > These changes enhance user control and improve display ergonomics for 
large or complex DataFrames.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to