Introduction to Python
I have developed an interactive introduction to the Python programming language using Colab Notebooks, which you can access below. The introduction requires no prior knowledge of Python and is comprised of three notebooks. The notebooks are run entirely in the cloud and require no setup to use. Try to open one of the notebooks below!
The first notebook covers the basics of how to use Google Colab and write Python code. It focuses on essential Python programming concepts, Python data structures, functions, and other built-in tools.
The second notebook delves into two of the most popular third-party libraries: NumPy and pandas. NumPy is arguably the most important library for numerical computing in Python and pandas provides data structures and data manipulation tools for efficient data cleaning and analysis.
The third notebook contains a set of exercises and a short introduction to plotting using matplotlib and seaborn. The exercises are used to get comfortable with the material in the first two notebooks and to introduce scikit-learn and TensorFlow, which are very flexible machine learning toolkits.
Some of the material in the notebooks is based on Python for Data Analysis (3rd Edition) by Wes McKinney (2022).
Colab Notebooks without answers
Colab Notebooks with answers
Custom functions
Data
The data in "National_Carbon_Emissions_2021v1.0.xlsx" is from the Global Carbon Project (2019).
The data in "usa.xlsx" is from the World Development Indicators database of the World Bank and the Global Carbon Project (2019).