Skip to content

Pandas - Repeat headings every n-th row in Jupyter-lab notebook #27563

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Code4SAFrankie opened this issue Jul 24, 2019 · 2 comments
Closed

Pandas - Repeat headings every n-th row in Jupyter-lab notebook #27563

Code4SAFrankie opened this issue Jul 24, 2019 · 2 comments
Labels
Enhancement IO HTML read_html, to_html, Styler.apply, Styler.applymap

Comments

@Code4SAFrankie
Copy link

Code Sample, a copy-pastable example if possible

pd.set_option('display.max_columns', None)
df.head(30)

Problem description

Is there a way to repeat the headings (column titles) of a Pandas dataframe every n-th row in a Jupyter-lab notebook.

I normally use pd.set_option('display.max_columns', None) with pandas in a Jupyter-lab notebook, since I want to view all the columns and data. However when showing more than 10 rows the scroll bar at the bottom is hidden when viewing the headings and the headings are hidden when viewing the scroll bar; which makes it very difficult to know what you are seeing or to know where to scroll to.

Is there a way to repeat the headings every n-th row or is it possible to have a vertical scrollbar as well with the headings then always remaining visible.

Expected Output

Headings and scrollbar visible at the same time.

Output of pd.show_versions()

[paste the output of pd.show_versions() here below this line]
commit: None
python: 3.7.1.final.0
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 94 Stepping 3, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None

pandas: 0.24.2
pytest: 4.0.0
pip: 19.2.1
setuptools: 40.6.2
Cython: 0.29
numpy: 1.16.2
scipy: 1.2.1
pyarrow: 0.11.1
xarray: 0.10.9
IPython: 7.1.1
sphinx: 1.8.1
patsy: 0.5.1
dateutil: 2.7.5
pytz: 2018.6
blosc: 1.6.1
bottleneck: 1.2.1
tables: 3.4.4
numexpr: 2.6.8
feather: 0.4.0
matplotlib: 3.0.2
openpyxl: None
xlrd: 1.1.0
xlwt: None
xlsxwriter: 1.1.2
lxml.etree: 4.2.5
bs4: 4.6.3
html5lib: 1.0.1
sqlalchemy: 1.2.12
pymysql: None
psycopg2: 2.7.7 (dt dec pq3 ext lo64)
jinja2: 2.10
s3fs: None
fastparquet: 0.1.6
pandas_gbq: None
pandas_datareader: 0.7.0
gcsfs: None

@simonjayhawkins simonjayhawkins added Enhancement IO HTML read_html, to_html, Styler.apply, Styler.applymap labels Jul 24, 2019
elisamalzoni added a commit to elisamalzoni/pandas that referenced this issue Aug 22, 2019
@WillAyd
Copy link
Member

WillAyd commented Aug 26, 2019

Per the discussions in #28091 I don't think repeating the headers is desired. @simonjayhawkins on the topic of fixed headers that would have to be handled by third party libraries, correct?

@WillAyd
Copy link
Member

WillAyd commented Oct 18, 2019

Closing as the PR for this was closed as well; I don't think this is a something we want to support

@WillAyd WillAyd closed this as completed Oct 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement IO HTML read_html, to_html, Styler.apply, Styler.applymap
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants