microsoft / vscode-data-wrangler

Other
427 stars 19 forks source link

Can't add filter to column #306

Open sian0x0 opened 1 day ago

sian0x0 commented 1 day ago

Type: Bug

Behaviour

The pop-up to set a filter disappears when I click on it by itself less than a second after appearing, instead of allowing me to set a filter. The table reloads.

Added information: It does not happen every time. When it does, it happens on all columns, regardless of whether sorts or filters are set, and persists after pressing 'Refresh data'.

Expected vs. Actual

Expected: Click on 'Add filter' at the top of a column, enter desired filter in pop-up. Actual: Click on 'Add filter' at the top of a column, pop-up disappears on interaction and displayed data refreshes. The data is a DataFrame with 38,000 rows, 4 columns. Filter is working on a DataFrame with 350 rows.

Steps to reproduce:

  1. Open a DataFrame with 38,000 rows from Jupyter variables pane.
  2. Click on the three dots then choose 'Add filter' at the top of a column.

Diagnostic data

{
  "installed": {
    "pandas": "2.2.2"
  },
  "required": {
    "pandas": "1.2.0"
  },
  "unsatisfied": []
}

Extension version: 1.10.0 VS Code version: Code 1.93.1 (38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40, 2024-09-11T17:20:05.685Z) OS version: Linux x64 6.8.0-45-lowlatency snap Modes:

System Info |Item|Value| |---|---| |CPUs|11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz (8 x 3620)| |GPU Status|2d_canvas: unavailable_software
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
webgpu: disabled_off
webnn: disabled_off| |Load (avg)|1, 1, 1| |Memory (System)|31.08GB (23.38GB free)| |Process Argv|--no-sandbox --force-user-env --crash-reporter-id 577542b9-7b63-4e58-804e-5a5b4fde75ae| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|plasma| |XDG_CURRENT_DESKTOP|KDE| |XDG_SESSION_DESKTOP|KDE| |XDG_SESSION_TYPE|x11|
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805cf:30301675 binariesv615:30325510 vsaa593:30376534 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 a9j8j154:30646983 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonnoceb:30805159 asynctok:30898717 pythonmypyd1:30879173 h48ei257:31000450 pythontbext0:30879054 accentitlementsc:30995553 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 dsvsc021:30996838 0ee40948:31013168 a69g1124:31058053 dvdeprecation:31068756 dwnewjupyter:31046869 2f103344:31071589 impr_priority:31102340 nativerepl2:31139839 refactort:31108082 pythonrstrctxt:31112756 flightc:31134773 wkspc-onlycs-t:31132770 wkspc-ranged-c:31125598 cf971741:31144450 autoexpandse:31146404 cc771715:31146322 ```
pwang347 commented 12 hours ago

Hi @sian0x0, thanks for reporting this issue! I can't seem to reproduce it on my end with the details you've provided.

Does the following code reproduce the issue for you?

import pandas as pd
n_rows = 38_000
data = {
    "col1": ["Lorem ipsum dolor sit amet"] * n_rows,
    "col2": [123] * n_rows,
    "col3": [123.456] * n_rows,
    "col4": [{}] * n_rows,
}
df = pd.DataFrame(data)
df

If not, could you please provide either a modified version of the code above that does cause the filter problem, or perhaps the data you are working with if it is not sensitive?

Thank you!