Getting Started with Python & Using the Right Tools
Specialist Analytics Team (SAT)
What to Expect?
Learning a language is hard. It can be frustrating. Perseverance is key to success.
These sessions will introduce you to Python, showing you what is possible and how to achieve some of what might benefit your work.
But the real learning comes by doing. You need to run the code yourself, have a play around, and cement what you’ve learned by applying it.
Practice, repetition, and making mistakes along the way is how real progress is made.
Why Learn Python?
Coding skills, generally, and Python specifically, seem to be a priority in the NHS right now. It’s a clear direction of travel. Learning now sets you up for the future.
Python and the applied skills taught in these sessions will enable you to use advanced methods and design flexible, scalable solutions.
Python is very valuable for career development.
It is (hopefully) fun!
Tools of the Trade
Everything you will need to get started
The Toolkit
We will be using the following tools throughout this course:
Language: Python
Dependency management: uv
Version Control: Git, GitHub Desktop
IDE: VS Code/Jupyter Notebooks (or your preferred IDE)
You can install all these tools by running the following in PowerShell:
Python is an all-purpose programming language that is the most popular worldwide and widely used in almost every industry.
Python’s popularity is owed to its flexibility – it is the second-best tool for every job.
It is a strong choice for data science and analytics, being one of the best languages for data wrangling, data visualisation, statistics, and machine learning.
It is also well-suited to web development, scientific computing, and automation.
Dependency Management
Dependency management refers to the process of tracking and managing all of the packages (dependencies) a project needs to run. It ensures:
The right packages are installed.
The correct versions are used.
Conflicts between packages are avoided.
We are using uv for dependency management.
Virtual Environments
Virtual environments are isolated Python environments that allow you to manage dependencies for a specific project without the state of those dependencies affecting other projects or your wider system. They help by:
Keeping dependencies separate for each project.
Avoiding version conflicts between projects.
Making dependency management more predictable and reproducible.
Virtual environments are a part of dependency management, and we will use uv to manage both the dependencies and virtual environments.
Version Control
Version control is the practice of tracking and managing changes to code or files over time, allowing you to:
Revert to earlier versions if needed.
Collaborate with others on the same project easily.
Maintain a history of changes.
We are using Git (the version control system) and GitHub (the platform for hosting our work).
IDE
An IDE (Integrated Development Environment) is fully featured software that provides everything you need to write code as conveniently as possible.
It typically includes a code editor, debugger, build tools, and features like syntax highlighting and code completion.
Some common IDEs used for Python include VS Code, PyCharm, Vim, Jupyter Notebooks/JupyterLab, and Positron.
We will use VS Code or Jupyter Notebooks (which is not exactly an IDE but is similar).