How to freeze the top row and the first column using XlsxWriter?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



How to freeze the top row and the first column using XlsxWriter?



I am exporting a pandas DataFrame to Excel, and since it contains a lot of rows and columns, it would be useful to keep the top row and the first column when browsing its contents.


DataFrame



There is a feature present in Excel that allows for freezing the top row and the first column. Is accessible through XlsxWriter when exporting DataFrames to excel?


XlsxWriter




1 Answer
1



You can use worksheet.freeze_panes() to achieve this . There are many options for that method. Read http://xlsxwriter.readthedocs.io/worksheet.html#worksheet-freeze-panes to know how to use the method.


worksheet.freeze_panes()





Thanks! I tried the suggested worksheet.freeze_panes(1, 1) and it worked.
– Krzysztof Słowiński
Jan 30 at 11:02


worksheet.freeze_panes(1, 1)






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard