{"id":15623847,"url":"https://github.com/justmarkham/python-reference","last_synced_at":"2025-04-04T08:07:52.410Z","repository":{"id":32282320,"uuid":"35857082","full_name":"justmarkham/python-reference","owner":"justmarkham","description":"Python Quick Reference","archived":false,"fork":false,"pushed_at":"2018-11-05T14:05:55.000Z","size":30,"stargazers_count":691,"open_issues_count":3,"forks_count":412,"subscribers_count":46,"default_branch":"master","last_synced_at":"2025-03-28T07:07:07.827Z","etag":null,"topics":["jupyter-notebook","python","quick-reference","reference","script"],"latest_commit_sha":null,"homepage":"http://www.dataschool.io/python-quick-reference/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/justmarkham.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-19T03:26:46.000Z","updated_at":"2025-03-27T19:21:43.000Z","dependencies_parsed_at":"2022-09-12T03:50:43.691Z","dependency_job_id":null,"html_url":"https://github.com/justmarkham/python-reference","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justmarkham%2Fpython-reference","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justmarkham%2Fpython-reference/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justmarkham%2Fpython-reference/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justmarkham%2Fpython-reference/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justmarkham","download_url":"https://codeload.github.com/justmarkham/python-reference/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247142066,"owners_count":20890652,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jupyter-notebook","python","quick-reference","reference","script"],"created_at":"2024-10-03T09:59:06.494Z","updated_at":"2025-04-04T08:07:52.382Z","avatar_url":"https://github.com/justmarkham.png","language":"Jupyter Notebook","readme":"## Python Quick Reference\n\n### View as a [Python script](reference.py) or a [Jupyter notebook](http://nbviewer.jupyter.org/github/justmarkham/python-reference/blob/master/reference.ipynb)\n\nThis is the reference guide to Python that I **wish** had existed when I was learning the language.\n\nHere's what I want in a reference guide:\n\n- **High-quality examples** that show the simplest possible usage of a given feature\n- **Explanatory comments**, and descriptive variable names that eliminate the need for some comments\n- Presented as a **single script (or notebook)**, so that I can keep it open and search it when needed\n- **Code that can be run** from top to bottom, with the relevant objects defined nearby\n\nThis is **not** 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).\n\nThe guide was written using Python 2 but is **fully compatible** with Python 3. Relevant differences between Python 2 and 3 are noted throughout the guide.\n\n### Table of Contents\n\nClick to jump to the relevant section of the script or the notebook:\n\n1. Imports ([script](reference.py#L28), [notebook](http://nbviewer.jupyter.org/github/justmarkham/python-reference/blob/master/reference.ipynb#1.-Imports))\n2. Data Types ([script](reference.py#L52), [notebook](http://nbviewer.jupyter.org/github/justmarkham/python-reference/blob/master/reference.ipynb#2.-Data-Types))\n3. Math ([script](reference.py#L84), [notebook](http://nbviewer.jupyter.org/github/justmarkham/python-reference/blob/master/reference.ipynb#3.-Math))\n4. Comparisons and Boolean Operations ([script](reference.py#L102), [notebook](http://nbviewer.jupyter.org/github/justmarkham/python-reference/blob/master/reference.ipynb#4.-Comparisons-and-Boolean-Operations))\n5. Conditional Statements ([script](reference.py#L121), [notebook](http://nbviewer.jupyter.org/github/justmarkham/python-reference/blob/master/reference.ipynb#5.-Conditional-Statements))\n6. Lists ([script](reference.py#L150), [notebook](http://nbviewer.jupyter.org/github/justmarkham/python-reference/blob/master/reference.ipynb#6.-Lists))\n7. Tuples ([script](reference.py#L224), [notebook](http://nbviewer.jupyter.org/github/justmarkham/python-reference/blob/master/reference.ipynb#7.-Tuples))\n8. Strings ([script](reference.py#L259), [notebook](http://nbviewer.jupyter.org/github/justmarkham/python-reference/blob/master/reference.ipynb#8.-Strings))\n9. Dictionaries ([script](reference.py#L319), [notebook](http://nbviewer.jupyter.org/github/justmarkham/python-reference/blob/master/reference.ipynb#9.-Dictionaries))\n10. Sets ([script](reference.py#L372), [notebook](http://nbviewer.jupyter.org/github/justmarkham/python-reference/blob/master/reference.ipynb#10.-Sets))\n11. Defining Functions ([script](reference.py#L409), [notebook](http://nbviewer.jupyter.org/github/justmarkham/python-reference/blob/master/reference.ipynb#11.-Defining-Functions))\n12. Anonymous (Lambda) Functions ([script](reference.py#L474), [notebook](http://nbviewer.jupyter.org/github/justmarkham/python-reference/blob/master/reference.ipynb#12.-Anonymous-%28Lambda%29-Functions))\n13. For Loops and While Loops ([script](reference.py#L495), [notebook](http://nbviewer.jupyter.org/github/justmarkham/python-reference/blob/master/reference.ipynb#13.-For-Loops-and-While-Loops))\n14. Comprehensions ([script](reference.py#L540), [notebook](http://nbviewer.jupyter.org/github/justmarkham/python-reference/blob/master/reference.ipynb#14.-Comprehensions))\n15. Map and Filter ([script](reference.py#L594), [notebook](http://nbviewer.jupyter.org/github/justmarkham/python-reference/blob/master/reference.ipynb#15.-Map-and-Filter))\n\n### Other Python Resources\n\nIf you like the general format of this guide, but need **more explanation of each topic**, I highly recommend reading the Appendix of [Python for Data Analysis](http://shop.oreilly.com/product/0636920023784.do). It presents the essentials of the Python language in a clear and focused manner.\n\nIf you are looking for a resource that will help you to **learn Python from scratch**, this is [my list of recommended resources](https://github.com/justmarkham/DAT8#python-resources).\n\n### Suggestions or Corrections\n\nIf there's a **topic or example** you'd like me to add to this guide, or you notice a **mistake**, please [create a GitHub issue](../../issues) or [leave a blog comment](http://www.dataschool.io/python-quick-reference/).\n\nThank you!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustmarkham%2Fpython-reference","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustmarkham%2Fpython-reference","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustmarkham%2Fpython-reference/lists"}