paddymul / buckaroo

Buckaroo - the data wrangling assistant for pandas. Quickly explore dataframes, and run pandas commands via a GUI. Works inside the jupyter notebook.
https://buckaroo-data.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
174 stars 8 forks source link

Display "No Rows to show" appears as a cell in summary stats #255

Open nasrin1748 opened 5 months ago

nasrin1748 commented 5 months ago

Checks

What type of jupyter notebook were you using (VSCode notebook, google colab, Jupyter Lab, Jupyter notebook). Select multiple if you can reproduce this in multiple environments. If other, please add to description.

Jupyter Notebook

Reproducible example

import pandas as pd
import buckaroo
df = pd.DataFrame({
    'name':['Softhints', 'DataScientyst'],
    'url':['https://www.softhints.com', 'https://datascientyst.com'],
    'url2':['https://www.blog.softhints.com/tag/pandas', 'https://datascientyst.com/tag/pandas']
})
df

"No Rows to Show" display merges with the summary details and looks odd.

buck
import numpy as np
import buckaroo
df = pd.DataFrame([('falcon', 'bird', 389.0, 2),
                   ('parrot', 'bird', 24.0, 2),
                   ('lion', 'mammal', 80.5, 4),
                   ('monkey', 'mammal', np.nan, 4)],
                  columns=['name', 'class', 'max_speed',
                           'num_legs'])
df
buck1

Issue description

"No Rows to Show" display doesn't look right.

Expected behavior

Display should be flexible to move depending on the number of columns.

Installed versions

``` executing in jupyter-notebook buckaroo : 0.6.5 jupyterlab : 4.1.5 notebook : 7.1.2 ipywidgets : 8.1.2 traitlets : 5.14.2 jupyter_core : 5.7.2 pandas : 2.1.4 numpy : 1.26.4 IPython : 8.22.2 ipykernel : 6.29.3 jupyter_client : 8.6.1 jupyter_server : 2.13.0 nbclient : 0.10.0 nbconvert : 7.16.2 nbformat : 5.10.2 qtconsole : 5.5.1 buckaroo : C:\Users\91949\anaconda3\new\Lib\site-packages\buckaroo\__init__.py jupyterlab : C:\Users\91949\anaconda3\new\Lib\site-packages\jupyterlab\__init__.py notebook : C:\Users\91949\anaconda3\new\Lib\site-packages\notebook\__init__.py ipywidgets : C:\Users\91949\anaconda3\new\Lib\site-packages\ipywidgets\__init__.py traitlets : C:\Users\91949\anaconda3\new\Lib\site-packages\traitlets\__init__.py jupyter_core : C:\Users\91949\anaconda3\new\Lib\site-packages\jupyter_core\__init__.py pandas : C:\Users\91949\anaconda3\new\Lib\site-packages\pandas\__init__.py numpy : C:\Users\91949\anaconda3\new\Lib\site-packages\numpy\__init__.py IPython : C:\Users\91949\anaconda3\new\Lib\site-packages\IPython\__init__.py ipykernel : C:\Users\91949\anaconda3\new\Lib\site-packages\ipykernel\__init__.py jupyter_client : C:\Users\91949\anaconda3\new\Lib\site-packages\jupyter_client\__init__.py jupyter_server : C:\Users\91949\anaconda3\new\Lib\site-packages\jupyter_server\__init__.py nbclient : C:\Users\91949\anaconda3\new\Lib\site-packages\nbclient\__init__.py nbconvert : C:\Users\91949\anaconda3\new\Lib\site-packages\nbconvert\__init__.py nbformat : C:\Users\91949\anaconda3\new\Lib\site-packages\nbformat\__init__.py qtconsole : C:\Users\91949\anaconda3\new\Lib\site-packages\qtconsole\__init__.py ```

Jupyter Log output

No response

paddymul commented 5 months ago

Thanks for the bugreport. Could you please provide a text block of python code so I can just copy and paste it to reproduce. The text code and the screenshot are important for bugs like this.

nasrin1748 commented 5 months ago

I have updated the issue with python code.