Print the contents of a DIV

Slight changes over earlier version – tested on CHROME function PrintElem(elem) { var mywindow = window.open(”, ‘PRINT’, ‘height=400,width=600’); mywindow.document.write(‘<html><head><title>’ + document.title + ‘</title>’); mywindow.document.write(‘</head><body >’); mywindow.document.write(‘<h1>’ + document.title + ‘</h1>’); mywindow.document.write(document.getElementById(elem).innerHTML); mywindow.document.write(‘</body></html>’); mywindow.document.close(); // necessary for IE >= 10 mywindow.focus(); // necessary for IE >= 10*/ mywindow.print(); mywindow.close(); return true; }

How to use HTML to print header and footer on every printed page of a document?

If you take the element that you want to be the footer and set it to be position:fixed and bottom:0, when the page prints it will repeat that element at the bottom of each printed page. The same would work for a header element, just set top:0 instead. For example: <div class=”divFooter”>UNCLASSIFIED</div> CSS: @media screen … Read more

How do I expand the output display to see more columns of a Pandas DataFrame?

Update: Pandas 0.23.4 onwards This is not necessary. Pandas autodetects the size of your terminal window if you set pd.options.display.width = 0. (For older versions see at bottom.) pandas.set_printoptions(…) is deprecated. Instead, use pandas.set_option(optname, val), or equivalently pd.options.<opt.hierarchical.name> = val. Like: import pandas as pd pd.set_option(‘display.max_rows’, 500) pd.set_option(‘display.max_columns’, 500) pd.set_option(‘display.width’, 1000) Here is the help … Read more