If you're a student in the Data Science major, you'll be learning Python through your coursework. The resources here are meant to supplement that learning, as well as provide avenues for you to pursue your more specific interests (e.g., machine learning, web scraping, etc.).

If you are not a Data Science student, these resources are still useful! Learning a programming language can help automate your research, whether you're working in biology, physics, social science, or some other domain. For those new to programming in general, the "Introductory Python tutorials" section is the place to start.

__Download Python__

First things first, you'll need to download Python, which is free. You can download Python by itself from the Python Software Foundation **here**. Alternatively, you can install the **Anaconda distribution** of Python. Anaconda includes Python, Jupyter notebooks capability, many pre-installed Python packages, and more, making it easy to get started quickly.

- Plotting and Programming in Python (Software Carpentry)This series of lessons from Software Carpentry is a great resource for beginners. The focus is on working with one data set from start to end. Highlighted packages include pandas and matplotlib.
- Learn Python (Code Academy)This series of Code Academy tutorials focuses on basic Python programming concepts (strings, conditionals, functions, loops, etc.).
- Google's Python classNot for those completely new to programming, but a good introduction to the specifics of Python.

- Learn Python the Hard Way byISBN: 9780321884916Publication Date: 2013-10-01This is a thorough and popular reference for Python beginners. As the book says: the "hard way" is easier in the end. To access, be sure you connected to the VPN or using the campus wifi network.
- Python 3 for Absolute Beginners byISBN: 9781430216339Publication Date: 2009-02-01This guide appeals to your intelligence and ability to solve practical problems, while gently teaching the most recent revision of the programming language Python. You can learn solid software design skills and accomplish practical programming tasks, like extending applications and automating everyday processes, even if you have no programming experience at all.

We have quite a few advanced Python books available through the library. Some of these are only accessible via a physical book copy, but many are available as e-books. Try searching the library catalog **UC Library Search **for "python" to see our entire collection.

In the meantime, these books may be useful.

- Learn More Python 3 byISBN: 9780134123486Publication Date: 2017-09-13The focus is on practice projects, so this is a great way to apply your Python knowledge to something more complex.
- Python Data Science Handbook byISBN: 9781491912058Publication Date: 2016-12-10Several resources exist for individual pieces of this data science stack, but only with the Python Data Science Handbook do you get them all--IPython, NumPy, Pandas, Matplotlib, Scikit-Learn, and other related tools. Working scientists and data crunchers familiar with reading and writing Python code will find this comprehensive desk reference ideal for tackling day-to-day issues: manipulating, transforming, and cleaning data; visualizing different types of data; and using data to build statistical or machine learning models.
- Python for Data Analysis byISBN: 9781491957660Publication Date: 2017-10-20Get complete instructions for manipulating, processing, cleaning, and crunching datasets in Python. Updated for Python 3.6, the second edition of this hands-on guide is packed with practical case studies that show you how to solve a broad set of data analysis problems effectively. You'll learn the latest versions of pandas, NumPy, IPython, and Jupyter in the process. Written by Wes McKinney, the creator of the Python pandas project, this book is a practical, modern introduction to data science tools in Python.
- Machine Learning with Python Cookbook byISBN: 9781491989388Publication Date: 2018-04-01This practical guide provides recipes to help you solve machine learning challenges you may encounter in your daily work. You'll find recipes for: Vectors, matrices, and arrays Handling numerical and categorical data, text, images, and dates and times Dimensionality reduction using feature extraction or feature selection Model evaluation and selection Linear and logical regression, trees and forests, and k-nearest neighbors Support vector machines (SVM), naïve Bayes, clustering, and neural networks Saving and loading trained models.
- Web Scraping with Python byISBN: 9781491985571Publication Date: 2018-04-14The expanded edition of this practical book not only introduces you web scraping, but also serves as a comprehensive guide to scraping almost every type of data from the modern web. Part I focuses on web scraping mechanics: using Python to request information from a web server, performing basic handling of the server's response, and interacting with sites in an automated fashion. Part II explores a variety of more specific tools and applications to fit any web scraping scenario you're likely to encounter.

**Getting started with Jupyter notebooks**This guide is an introduction to the Jupyter notebook interface for beginners. Topics covered include: how to open Jupyter, creating and working with notebooks, working with notebook cells, and adding comments and text.

- 28 Jupyter Notebook tips, tricks, and shortcutsTopics include keyboard shortcuts, adjusting output display of variables, IPython magic commands, and more.
- Advanced Jupyter notebook tricks (part 1)Topics include running different languages (e.g., R) in in notebook cells, batching notebooks runs, and exporting notebooks as HTML.
- Advanced Jupyter notebook tricks (part 2)This article covers building interactive dashboards with Jupyter using ipywidgets.
- Markdown cheatsheetThis is meant to be a quick reference guide for Markdown syntax. Add headers, emphasis, lists, links, tables, videos, and more.
- Another Markdown cheatsheetAnother Markdown reference guide, with additional guides (tasks lists, emojis, issue references, username mentions).
- Ten Simple Rules for Reproducible Research in Jupyter NotebooksThis pre-print lays out 10 guidelines for effectively using Jupyter notebooks in the context of reproducible research.

One of the main benefits of Python is the vast array of pre-existing packages (also called libraries), written by other Python users and available for installation. You can find Python packages on **PyPI**, the Python Package Index.

This **overview **of popular Python libraries provides a starting point for finding applicable libraries. For more advanced users, this **comprehensive list** of packages by topic includes links to further resources.

If using the Anaconda distribution of Python, many libraries come pre-installed. This **tutorial** covers the steps needed to install additional packages.

Here are some resources for popular data science Python libraries:

- NumPyNumPy is a fundamental library, used for any scientific computing

NumPy quick start

NumPy basic examples

NumPy cheat sheet - SciPySciPy is another fundamental library for scientific computing, often used in conjunction with NumPy

SciPy documentation and user guide

SciPy tutorial - pandaspandas is a library for working with/organizing data (data wrangling)

10 minute to pandas

pandas cookbook

pandas cheat sheet - StatsmodelStatsmodels is a library for statistical analysis

Statsmodels examples

Lots of Statsmodels tutorials - scikit-learnScikit-learn is a library for machine learning

scikit-learn quick start

scikit-learn algorithm cheat sheet - NLTKNLTK (Natural Language Toolkit) is a library for Natural Language Processing (NLP)

NLTK ebook tutorial

hands-on NLTK tutorial

NLTK cheat sheet - matplotlibMatplotlib is a core data visualization library

matplotlib tutorials (intro, intermediate, and advanced)

Matplotlib at Python Graph Gallery - seabornSeaborn is a statistical data visualization library based on matplotlib

Seaborn tutorials

Seaborn examples

Seaborn example - ScrapyScrapy is a package for web scraping and crawling web sites

Scrapy overview

Scrapy tutorial

Scrapy tutorial with examples

Read **here **for an overview of some of the other data science-related packages, including wget (downloading files from browsers), FlashText (cleaning text for natural language processing), PyFlux (time series data), and more.