What is Python?
Python is a general-purpose programming language that is easy to learn and easy to read. Since its first release in 1991, it has become one of the most popular programming languages in the world, used by organisations such as Google, Netflix, Spotify and Uber.
Its clear, readable syntax helps you write code faster and collaborate more easily. Combined with a rich ecosystem of libraries for transforming, analysing and visualising data, this has made Python the leading language for data science and artificial intelligence across technology, finance, healthcare, retail and the public sector.
Python Workshops
This workshop series introduces the fundamentals of programming that underpin all work in Python, from data analysis and machine learning to software development.
Each workshop is two hours long and built around a real-world project. Rather than following a lecture, you will work towards a finished output with fellow learners, using AI, web searches and documentation to solve problems, with a Python expert on hand if you get stuck. Along the way, you will build the skills programmers rely on every day: breaking problems down, testing as you go and finding answers independently.
These workshops take place in LBR.R.08 located on the lower ground floor of the library. Computers are provided.
If you have never used Python before, we advise starting with Python 1.
Sign up to Intro to Python:
Write a script that calculates the outcome of an investment. Learn to perform calculations, store values in variables, and combine text and numbers to print clear summary sentences.
Sign up to Python Workshop Series:
Turn your calculator into an interactive tool. Let users enter their own values, convert between text and numbers, and use if-else statements to set the interest rate based on the length of the investment.
Store a collection of movies in a list, then use for loops and if statements to recommend titles that start with the user’s chosen letter, whether they type it in upper or lower case.
Build a more powerful recommender with nested lists. Filter movies by genre, year of release and minimum rating, and present the results in a user-friendly way.
Take your first steps in data analysis with pandas and seaborn. Import a dataset of credit card transactions, calculate summary statistics, compare fraud rates across professions using the split-apply-combine technique, and visualise the results in a bar chart.
Clean and explore OECD data on income inequality (the Gini index) and public spending on social programmes. Filter, rename, sort and de-duplicate the data, inspect it with VS Code’s Data Wrangler, and plot how inequality and social spending have changed in the UK over time.
Technical Requirements
All software is provided on the lab computers. If you would like to use your own laptop, please set it up before your first workshop by following our installation guide on Moodle (LSE login required). The guide walks you through installing Python and VS Code, the editor we use to work with Jupyter Notebooks.
Python installation guide (Moodle)
You will also need to sign in to Claude with your LSE account during the workshops. If you run into any installation problems, you can still take part fully using the lab computers.
The Python training series is a meaningful task based introduction to Python coding language. The instructors provide guidance when needed throughout the independent partnered learning experience. Very grateful for this resource!
Laura Stahl, Department of Anthropology