paddymul / buckaroo

Buckaroo - the data wrangling assistant for pandas. Quickly explore dataframes, and run pandas commands via a GUI. Works inside the jupyter notebook.
https://paddymul.github.io/buckaroo/
BSD 3-Clause "New" or "Revised" License
227 stars 9 forks source link

max_length of string displayer has no effect #300

Open paddymul opened 1 month ago

paddymul commented 1 month ago

Checks

What type of jupyter notebook were you using (VSCode notebook, google colab, Jupyter Lab, Jupyter notebook). Select multiple if you can reproduce this in multiple environments. If other, please add to description.

Jupyter Notebook

Reproducible example

base_str_col = 

str_df = pd.DataFrame({
        'strings_string_displayer_max_len':  base_str_col,
        'strings_obj_displayer':  base_str_col,
        'strings_string_displayer': base_str_col,
})
str_config =  {
        'strings_string_displayer_max_len': {'displayer_args': {'displayer': 'string', 'max_length':35}},
        'strings_obj_displayer':  {'displayer_args': {'displayer': 'obj'}},      
        'strings_string_displayer': {'displayer_args': {'displayer': 'string'}},
    }
BuckarooWidget(str_df, column_config_overrides=str_config)

https://py.cafe/app/paddymul/buckaroo-gallery

Issue description

setting max_length on a string displayer has no appreciable affect

Screenshot 2024-10-15 at 12 09 22 PM

Expected behavior

max_length should affect clipping of a column. This is probably related to the column width, not the actual formatter applied to the value.

Installed versions

``` Latest ```

Jupyter Log output

No response