[PyCharm Tables] PY-78710 DataView: Columns statistics artifacts #PY-78710 Fixed

* Changed "Missing" to "None Count" for clarity
* Fixed types for the __compute_sliced_data function
* Fixed a case where there is no visualization for the first column because of warnings

(cherry picked from commit 2e4f700fba4f6578c3f91eac9fa0756e94e71310)

GitOrigin-RevId: e31cd31bb3e718377e7a8957fb71ccd11d0c18a6
This commit is contained in:
Natalia.Murycheva
2025-02-24 18:23:35 +01:00
committed by intellij-monorepo-bot
parent 077ee31039
commit 28eef02586

View File

@@ -104,13 +104,16 @@ def get_column_descriptions(table):
def get_value_occurrences_count(table):
import warnings
df = __convert_to_df(table)
bin_counts = []
for _, column_data in df.items():
column_visualisation_type, result = __analyze_column(column_data)
with warnings.catch_warnings():
warnings.simplefilter("ignore") # Suppress all
for _, column_data in df.items():
column_visualisation_type, result = __analyze_column(column_data)
bin_counts.append(str({column_visualisation_type:result}))
bin_counts.append(str({column_visualisation_type:result}))
return ColumnVisualisationUtils.TABLE_OCCURRENCES_COUNT_NEXT_COLUMN_SEPARATOR.join(bin_counts)
@@ -119,7 +122,7 @@ def __get_data_slice(table, start, end):
def __compute_sliced_data(table, fun, start_index=None, end_index=None, format=None):
# type: (Union[pd.DataFrame, pd.Series], function, int, int) -> str
# type: (Union[pd.DataFrame, pd.Series], function, Union[None, int], Union[None, int], Union[None, str]) -> str
max_cols, max_colwidth, max_rows = __get_tables_display_options()