Introduction to Python
February 26-28
9:00am - 11:00am Pacific Time each day
Description: Python can be used in many humanities and social sciences workflows, and it is an easy and fun language to learn. This introductory 3-day, 6-hour course will walk you through the basics of programming in Python starting at the beginner’s level. We will cover the main language features – variables and data types, conditionals, lists, for/while loops, list comprehensions, dictionaries, writing functions, and working with external libraries, doing many exercises along the way. In the second part we will take a look at some of the libraries in more details, including pandas for working with large tables, simple plotting with matplotlib, and few others.
Instructor: Alex Razoumov (SFU)
Prerequisites: None.
Software: We will be using Python on our training cluster, so no need to install it on your computer. However, in the long run you would probably benefit from Python on your computer, so you might want to look into this.
Day 1
Setup and running Jupyter notebooks
Variables and data types
Built-in functions and help
Conditionals
Lists
Day 2
Loops
Dictionaries
Writing functions
Working with strings, variable scope, exceptions
Libraries, virtual environments and packaging
Day 3
Pandas dataframes
Image manipulation, hierarchical data, time
Web scraping
Plotting with matplotlib
Links
- Workshop What format to choose to save your data from November 2022
- YouTube channel Python Tutorials for Digital Humanities by William Mattingly