quantopian / qgrid

An interactive grid for sorting, filtering, and editing DataFrames in Jupyter notebooks
Apache License 2.0
3.04k stars 422 forks source link

Scroll Bar Not Showing Up #173

Open nominamar opened 6 years ago

nominamar commented 6 years ago

Environment

Description of Issue

Reproduction Steps

  1. create my DataFrame (DF) using pivot
  2. import qgrid qgrid.show_grid(DF, grid_options={'forceFitColumns': False, 'defaultColumnWidth': 100})
  3. DF contains columns with NaN. Scroll_bar shows up for only a certain number of columns. ...

What steps have you taken to resolve this already?

It seems to work on a df that doesn't have NaN, but I need to include the NaN's in my df. It also seems to work for columns that have a greater range. ...

Anything else?

...

TimShawver commented 6 years ago

Could you send a screenshot of what you're seeing? Normally Qgrid doesn't show scrollbars for individual columns, just for the grid area as a whole, so it's hard for my to envision what you're describing.

kyu999 commented 5 years ago

same problem here The note is here below:

import numpy as np
import pandas as pd
import qgrid
randn = np.random.randn
df_types = pd.DataFrame({
    'A' : pd.Series(['2013-01-01', '2013-01-02', '2013-01-03', '2013-01-04',
               '2013-01-05', '2013-01-06', '2013-01-07', '2013-01-08', '2013-01-09'],index=list(range(9)),dtype='datetime64[ns]'),
    'B' : pd.Series(randn(9),index=list(range(9)),dtype='float32'),
    'C' : pd.Categorical(["washington", "adams", "wasdddddddddddddddddddddddddddddddddddddddddhington", "madison", "lincoln","jefferson", "hamilton", "roosevelt", "kennedy"]),
    'D' : ["foo", "bar", "buzz", "bippity","boppity", "foo", "foo", "bar", "zoo"],
    'D2' : ["foo", "bar", "buzz", "bippity","boppity", "foo", "foo", "bar", "zoo"],
    'D3' : ["foo", "bar", "buzz", "bippity","boppity", "foo", "foo", "bar", "zoo"],
    'D4' : ["foo", "bar", "buzz", "bippity","boppity", "foo", "foo", "bar", "zoo"],
    'D5' : ["foo", "bar", "buzz", "bippity","boppity", "foo", "foo", "bar", "zoo"],
    'D6' : ["foo", "bar", "buzz", "bippity","boppity", "foo", "foo", "bar", "zoo"],
    'D7' : ["foo", "bar", "buzz", "bippity","boppity", "foo", "foo", "bar", "zoo"],
    'D8' : ["foo", "bar", "buzz", "bippity","boppity", "foo", "foo", "bar", "zoo"],
    'D9' : ["foo", "bar", "buzz", "bippity","boppity", "foo", "foo", "bar", "zoo"],
    'C111111' : ["foo", "bar", "buzz", "bippity","boppity", "foo", "foo", "bar", "zoo"],
    'C111112' : ["foo", "bar", "buzz", "bippity","boppity", "foo", "foo", "bar", "zoo"],
    'C111113' : ["foo", "bar", "buzz", "bippity","boppity", "foo", "foo", "bar", "zoo"],
    'C111114' : ["foo", "bar", "buzz", "bippity","boppity", "foo", "foo", "bar", "zoo"],
    'C111115' : ["foo", "bar", "buzz", "bippity","boppity", "foo", "foo", "bar", "zoo"],
    'C111116' : ["foo", "bar", "buzz", "bippity","boppity", "foo", "foo", "bar", "zoo"],
    'C111117' : ["foo", "bar", "buzz", "bippity","boppity", "foo", "foo", "bar", "zoo"],
    'C111118' : ["foo", "bar", "buzz", "bippity","boppity", "foo", "foo", "bar", "zoo"],
    'C11111111119' : ["foo", "bar", "buzz", "bippity","boppity", "foo", "foo", "bar", "zoo"],
    'C1111110' : ["foo", "bar", "buzz", "bippity","boppity", "foo", "foo", "bar", "zoo"]
})
df_types['E'] = df_types['D'] == 'foo'
qgrid_widget = qgrid.show_grid(df_types, show_toolbar=True,column_options={'rerenderOnResize': False, 'minWidth': 100})
qgrid_widget

As you notice, a few columns inserted into the demo note(index.ipynb). Then, the grid show up, but no scroll bar.

スクリーンショット 2019-04-09 14 22 40

It is so hard to figure out what columns exist in the table, and can't see some columns. Do you have a way to avoid this kind of situation?

KapilaKhaded commented 4 years ago

I am facing similar problem on Mac. data frame with 700 rows doesn't show vertical scroll bar. Screenshot attached for reference.

image

spokeydokeys commented 4 years ago

I'm seeing the same thing with an eight row dataframe image

The grid is being set up as follows:

qgrid.show_grid(self._data,
                show_toolbar=False,
                grid_options={
                    'sortable': False,
                    'editable': True,
                    'forceFitColumns': False
                },
                column_options={
                    'sortable': False,
                    'editable': True
                })

and self._data is the eight row dataframe. System: Windows 10 Pro 64bit jupyter_core 4.6.1 jupyter_client 5.3.4 ipywidgets 7.5.1 qgrid 1.1.1 and 1.3.1 (I tested on both) python 3.7.5