From b5ec48e6508487b64a886dd995294ddd5d418ecd Mon Sep 17 00:00:00 2001 From: "Georgii.Zorabov" Date: Tue, 24 Oct 2023 21:33:00 +0000 Subject: [PATCH] DS-5284-fixes fixes for visualisations in table header. Percentage threshold is moved from 70 to 60, size of visualisations is decreased, font of percentage values is changed, colours are properly named, so everything works good when theme is switched and describe command processing is refactored to correctly avoid possible warnings in its text for pandas and polars, also, added bars to histograms with height 0 to get rid of empty space. Merge-request: IJ-MR-117579 Merged-by: Georgii Zorabov GitOrigin-RevId: cf9e75fa51d827266c5b63116769bc662cc0d26b --- python/helpers/pydev/_pydevd_bundle/pydevd_tables.py | 1 + python/helpers/pydev/_pydevd_bundle/tables/pydevd_pandas.py | 2 +- python/helpers/pydev/_pydevd_bundle/tables/pydevd_polars.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/python/helpers/pydev/_pydevd_bundle/pydevd_tables.py b/python/helpers/pydev/_pydevd_bundle/pydevd_tables.py index 7195e82fe177..0e57683495ca 100644 --- a/python/helpers/pydev/_pydevd_bundle/pydevd_tables.py +++ b/python/helpers/pydev/_pydevd_bundle/pydevd_tables.py @@ -49,6 +49,7 @@ def exec_table_command(init_command, command_type, start_index, end_index, f_glo res.append(table_provider.get_value_counts(table)) res.append(NEXT_VALUE_SEPARATOR) res.append(table_provider.get_value_occurrences_count(table)) + res.append(NEXT_VALUE_SEPARATOR) elif command_type == TableCommandType.SLICE: diff --git a/python/helpers/pydev/_pydevd_bundle/tables/pydevd_pandas.py b/python/helpers/pydev/_pydevd_bundle/tables/pydevd_pandas.py index b592229ab4f6..4df7aa674d20 100644 --- a/python/helpers/pydev/_pydevd_bundle/tables/pydevd_pandas.py +++ b/python/helpers/pydev/_pydevd_bundle/tables/pydevd_pandas.py @@ -121,7 +121,7 @@ class ColumnVisualisationType: class ColumnVisualisationUtils: NUM_BINS = 5 MAX_UNIQUE_VALUES = 3 - UNIQUE_VALUES_PERCENT = 70 + UNIQUE_VALUES_PERCENT = 60 TABLE_OCCURRENCES_COUNT_NEXT_COLUMN_SEPARATOR = '__pydev_table_occurrences_count_next_column__' TABLE_OCCURRENCES_COUNT_NEXT_VALUE_SEPARATOR = '__pydev_table_occurrences_count_next_value__' diff --git a/python/helpers/pydev/_pydevd_bundle/tables/pydevd_polars.py b/python/helpers/pydev/_pydevd_bundle/tables/pydevd_polars.py index 32a246d32665..bccae4864c3d 100644 --- a/python/helpers/pydev/_pydevd_bundle/tables/pydevd_polars.py +++ b/python/helpers/pydev/_pydevd_bundle/tables/pydevd_polars.py @@ -77,7 +77,7 @@ class ColumnVisualisationType: class ColumnVisualisationUtils: NUM_BINS = 5 MAX_UNIQUE_VALUES = 3 - UNIQUE_VALUES_PERCENT = 70 + UNIQUE_VALUES_PERCENT = 60 TABLE_OCCURRENCES_COUNT_NEXT_COLUMN_SEPARATOR = '__pydev_table_occurrences_count_next_column__' TABLE_OCCURRENCES_COUNT_NEXT_VALUE_SEPARATOR = '__pydev_table_occurrences_count_next_value__'