{"id":299,"date":"2017-02-15T16:50:28","date_gmt":"2017-02-15T15:50:28","guid":{"rendered":"https:\/\/rosetta.vn\/short\/?p=299"},"modified":"2017-02-16T02:40:16","modified_gmt":"2017-02-16T01:40:16","slug":"quick-reference-to-python-in-a-single-script-and-notebook","status":"publish","type":"post","link":"https:\/\/rosetta.vn\/short\/2017\/02\/15\/quick-reference-to-python-in-a-single-script-and-notebook\/","title":{"rendered":"Quick reference to Python in a single script (and notebook)"},"content":{"rendered":"<p>Also consider\u00a0using pep8 style guide:<\/p>\n<p><a href=\"http:\/\/blog.sideci.com\/2015\/12\/14\/style-guide-of-python-and-lint-tool\/\">http:\/\/blog.sideci.com\/2015\/12\/14\/style-guide-of-python-and-lint-tool\/<\/a><\/p>\n<p>&#8212;<\/p>\n<blockquote><p>Below is the reference guide to Python that I <strong>wish<\/strong> had existed when I was learning the language.<\/p>\n<p>Here&#8217;s what I want in a reference guide:<\/p>\n<ul>\n<li><strong>High-quality examples<\/strong> that show the simplest possible usage of a given feature<\/li>\n<li><strong>Explanatory comments<\/strong>, and descriptive variable names that eliminate the need for some comments<\/li>\n<li>Presented as a <strong>single script (or notebook)<\/strong>, so that I can keep it open and search it when needed<\/li>\n<li><strong>Code that can be run<\/strong> from top to bottom, with the relevant objects defined nearby<\/li>\n<\/ul>\n<p>This is <strong>not<\/strong> written as a full-fledged Python tutorial, though I ordered the topics such that you can read it like a tutorial (i.e., each topic depends only on material preceding it).<\/p>\n<p>The guide was written using Python 2 but is <strong>fully compatible<\/strong> with Python 3. Relevant differences between Python 2 and 3 are noted throughout the guide.<\/p>\n<h2 id=\"viewdownloadthereferenceguide\">View\/Download the Reference Guide<\/h2>\n<p>You can view it as a <a href=\"https:\/\/github.com\/justmarkham\/python-reference\/blob\/master\/reference.py\">Python script<\/a> on GitHub. It&#8217;s also <strong>embedded<\/strong> below this blog post.<\/p>\n<p>You can view it as a <a href=\"http:\/\/nbviewer.jupyter.org\/github\/justmarkham\/python-reference\/blob\/master\/reference.ipynb\">Jupyter notebook<\/a> on nbviewer.<\/p>\n<p>If you want to <strong>save a copy<\/strong> of either the script or the notebook, just clone or download the<a href=\"https:\/\/github.com\/justmarkham\/python-reference\">GitHub repository<\/a>.<\/p><\/blockquote>\n<p>Source: <em><a href=\"http:\/\/www.dataschool.io\/python-quick-reference\/\">Quick reference to Python in a single script (and notebook)<\/a><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Also consider\u00a0using pep8 style guide: http:\/\/blog.sideci.com\/2015\/12\/14\/style-guide-of-python-and-lint-tool\/ &#8212; Below is the reference guide to Python that I wish had existed when I was learning the language. Here&#8217;s what I want in a reference guide: High-quality examples that show the simplest possible<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[30,215],"tags":[47,222,223,224],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p8jhJx-4P","_links":{"self":[{"href":"https:\/\/rosetta.vn\/short\/wp-json\/wp\/v2\/posts\/299"}],"collection":[{"href":"https:\/\/rosetta.vn\/short\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rosetta.vn\/short\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rosetta.vn\/short\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/rosetta.vn\/short\/wp-json\/wp\/v2\/comments?post=299"}],"version-history":[{"count":0,"href":"https:\/\/rosetta.vn\/short\/wp-json\/wp\/v2\/posts\/299\/revisions"}],"wp:attachment":[{"href":"https:\/\/rosetta.vn\/short\/wp-json\/wp\/v2\/media?parent=299"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rosetta.vn\/short\/wp-json\/wp\/v2\/categories?post=299"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rosetta.vn\/short\/wp-json\/wp\/v2\/tags?post=299"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}