From 3b94525ad4d244b0a6bfbddc9dc3cba3d37db831 Mon Sep 17 00:00:00 2001 From: "Natalia.Murycheva" Date: Wed, 16 Apr 2025 00:08:02 +0200 Subject: [PATCH] [PyCharm Tables] PY-75205 Correctly parse column names in wide tables #PY-75205 Fixed * Resolved an issue where column names were incorrectly parsed due to trimming in wide tables. * Removed the previous fallback mechanism that issued an extra request to the Python backend for the wide tables' case as: * 1 additional request was insufficient for handling all wide table cases * It also introduced significant performance overhead, as an additional request was sent for every wide table after each cell execution. * Currently, we provide columns names' completion for wide tables only for the subset of columns returned by get_frame. GitOrigin-RevId: 12f7127068c5b56f1b82b26c95b10cf7461d77c7 --- .../python/debugger/values/DataFrameDebugValueUtil.kt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/python/pydevSrc/src/com/jetbrains/python/debugger/values/DataFrameDebugValueUtil.kt b/python/pydevSrc/src/com/jetbrains/python/debugger/values/DataFrameDebugValueUtil.kt index bba5d4edcadf..2bb072b9df4a 100644 --- a/python/pydevSrc/src/com/jetbrains/python/debugger/values/DataFrameDebugValueUtil.kt +++ b/python/pydevSrc/src/com/jetbrains/python/debugger/values/DataFrameDebugValueUtil.kt @@ -75,11 +75,10 @@ private fun getDataWithColumnsNames(value: String): String? { !inSingleQuotes && !inDoubleQuotes && char == ']' } - return if (index != -1) { - value.substring(0, index + 1) - } - else { - null + return when { + index != -1 -> value.substring(0, index + 1) + value.endsWith("...") -> value.substring(0, value.length - 3) + else -> null } }