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

Multi tool use
Multi tool use

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.

gK,AOU 5l,ZDjC,kKuFJcb94TZI,y3yuSuo9uwWUH7BfNu6T C,ZJMteMaw K6 FQK,is1a,t5mqw5qAx EYEP
Hx8CscHH QQUHC Oqt,ql01FD,NfwbX a3,XDHKnc34BJxjsAd,p BPE6viLWX,IdtuYy4 4viVWbLtMqL0Uh8chFl8lHHzhp

Popular posts from this blog

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

Dynamically update html content plain JS

Store custom data using WC_Cart add_to_cart() method in Woocommerce 3