Skip to Main Content

Programming with Python

An introduction to programming with Python. Includes how to get started with Python, coding in Python with Jupyter Notebooks, and various links where you can learn more.

Intro

Programming with Python

python-logo

Python is one of the most popular and in-demand programming languages. In recent years it has become increasingly popular at universities as many researchers - faculty and students alike - use it for a wide variety of tasks from quantitative data analysis to text analysis, data visualization, machine learning, and more.

This page is designed to help members of the Dartmouth community (and beyond) get started with Python. Want to learn how to begin coding in Python? or why code? Why Python? You're in the right place.

Visit the complete guide for suggested installation instructions.

It also serves as a supplemental resource for the Python training opportunities we offer to faculty, staff, postdocs, and students. For more on those opportunities, see below.

Lessons, Tutorials, and Other Learning Resources

Learning Opportunities: On Campus

The Reproducible Research Team offers regular workshops on Python (as well as on variety of other computational skills that can help your research). Visit our workshop page at: http://dartgo.org/RRADworkshops to see a list of upcoming workshops. Many of these workshops are offered online, so you can attend remotely as long as you are a member of the Dartmouth community.

Some examples of workshops we have or will be offering with Python include:

1. Computational Text Analysis (from the basics of text analysis to employing Large Language Models to summarize texts, Winterim 2023-24)

2. Intro to Python Series (The Basics, Dataframes, Visualization, and Text Analysis, Spring 2023)

3. Text Analysis with Python Series (Winter 2023)

4. Machine Learning with Python (various courses)

5. Software Carpentries in-person training in Unix, GitHub, and Python (last offered March 2023)

6. and more ....

Coding Notebooks

In many of our Python workshops, students get some hands-on practice with Python using Jupyter notebooks. Many of these notebooks also work as standalone instruction materials. Faculty, students, and staff at Dartmouth have access to these notebooks through our JupyterHub. Instructions for getting started with JupyterHub are here.

For people who do not have access to Dartmouth materials or want to download and use these materials on their own machine, you can find our notebooks and other instruction materials at our GitLab page.

On both platforms, you can find coding notebooks and other materials on such topics as: Introduction to Python, Text Analysis in Python, APIs in Python, various machine learning topics in Python, interacting with Large Language Models in Python, and more....

Learning Opportunities: From Anywhere, For Anyone

  1. Software Carpentries Lessons  (free!; note they offer two similar but different lesson series for Python)
  2. Constellate Tutorials (on Dartmouth we have a subscription to Constellate which allows users to apply Python to text-mine their tens of thousands of journals, newspapers, and other sources; thus, some of their tutorials are designed for text analysis while others are more general purpose).
  3. For Text Analysis in particular:
    1. See Melanie Walsh, Introduction to Cultural Analytics (but also includes general-purpose tutorials)
  4. W3 Schools Tutorials: Python
  5. more...