mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-05 01:50:56 +07:00
[DS-5285] implemented statistic tooltip for tables in console
[DS-5285] made get_value_counts in polars return empty string instead of None [DS-5285] implemented statistic tooltip for tables in console Merge-request: IJ-MR-112213 Merged-by: Georgii Zorabov <georgii.zorabov@jetbrains.com> GitOrigin-RevId: 2099a4b284d2c8d7163238abee78b6ef409fe89a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
1bc0b2b4c4
commit
9fd1a47707
@@ -12,6 +12,7 @@ MAX_COLWIDTH = 200
|
||||
class TableCommandType:
|
||||
DF_INFO = "DF_INFO"
|
||||
SLICE = "SLICE"
|
||||
DESCRIBE = "DF_DESCRIBE"
|
||||
|
||||
|
||||
def is_error_on_eval(val):
|
||||
@@ -45,6 +46,11 @@ def exec_table_command(init_command, command_type, start_index, end_index, f_glo
|
||||
res.append(NEXT_VALUE_SEPARATOR)
|
||||
res.append(table_provider.get_column_types(table))
|
||||
|
||||
elif command_type == TableCommandType.DESCRIBE:
|
||||
res.append(table_provider.get_column_descriptions(table, MAX_COLS, MAX_COLWIDTH))
|
||||
res.append(NEXT_VALUE_SEPARATOR)
|
||||
res.append(table_provider.get_value_counts(table, MAX_COLS, MAX_COLWIDTH))
|
||||
|
||||
elif command_type == TableCommandType.SLICE:
|
||||
res.append(table_provider.get_data(table, MAX_COLS, MAX_COLWIDTH, start_index, end_index))
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ def get_column_descriptions(table, max_cols, max_colwidth):
|
||||
# Polars compute NaN-s in describe. So, we don't need get_value_counts for Polars
|
||||
def get_value_counts(table, max_cols, max_colwidth):
|
||||
# type: (Union[pl.DataFrame, pl.Series], int, int) -> str
|
||||
return
|
||||
return ""
|
||||
|
||||
|
||||
def __get_describe(table):
|
||||
|
||||
@@ -36,5 +36,5 @@ class TableCommand(debugger: RemoteDebugger?,
|
||||
}
|
||||
|
||||
enum class TableCommandType {
|
||||
DF_INFO, SLICE
|
||||
DF_INFO, SLICE, DF_DESCRIBE
|
||||
}
|
||||
Reference in New Issue
Block a user