Welcome to the repository for the Introduction to Python course with the CDCS. A repository can be thought of as a folder that has all the files you need in - the difference from a usual folder is that it is hosted online!
In this course you will be taking your first steps in learning how to program in Python. The great thing is that this course is made to start from scratch. Therefore across the 3 sessions you'll be learning lots of different bits of terminology and bits about programming without the thought that you may have heard about it before.
It is really key that throughout the course you ask questions whenever you are unsure about something. Both instructors will be on hand at all points in the sessions and through the Teams channel in between weeks to ensure you can ask whatever comes to your mind.
- Open the following link in a new tab https://noteable.edina.ac.uk/login
- Log in with your EASE credential
- Select Standard Python 3 and press start
- Select New > Python 3 Notebook
- Check that it works by trying some simple calculations like "3 + 2" in the first cell and run it.
2. Option B: Use Google Colab (installation free option - recommended for participants who do not have a UoE EASE login)
- Open Google Colab: https://colab.research.google.com/
- If you are not already logged you will be prompted to log-in via gmail
- Select New Notebook
- Check that it works by trying some simple calculation like "3 + 2" in the first cell and run it.
There are different ways of installing and running Python locally on your personal computer. These instructions use Anaconda, a popular Python distribution for data science and AI uses of Python.
- Go to https://www.anaconda.com/download
- Sign up and download the version for your operating system (Windows, Mac, or Linux)
- Follow the installations steps using the default options
- Once Anaconda is installed check:
- In Windows: Use the search bar to look for "Anaconda Prompt". Open it and access Python by writing "python". The Python command line will prompt. Check that it works by trying some simple calculation like "3 + 2".
- In Mac: Open the terminal and access Python by writing "python". The Python command line will prompt. Check that it works by trying some simple calculation like "3 + 2".
- If you would like to continue learning Python for general use, or would like more practice, explore these resources:
- The CDCS offers an intermediate course on Data Analysis with Python, which you will be able to follow after completing this course.
- The book Think Python offers an introduction to Python for total beginners with many exercises and is free to read online.
- If you are interested in Natural Language Processing (NLP) with Python, explore these resources:
- Introductory blog post describing different libraries and showing some simple code snippets: https://www.educative.io/blog/natural-language-processing-with-python-guide
- There are two main libraries that are used for NLP in Python: NLTK and spaCy. NLTK has been around for much longer, offers more customization options than spaCy, and has extensive documentation. However, it may be slower than spaCy for large datasets and has a steep learning curve due to the amount of customization options. spaCy is newer and much faster for many tasks, but offers less customization.
- Resources on data visualization in Python: There are different options for Python libraries for data visualization. Some popular ones are:
- Matplotlib is probably the most comprehensive and customizable library. This is a good starting point for general purpose visualizations in Python. Matplotlib provides a Getting Started guide.
- Seaborn is a higher-level library that uses Matplotlib internally. Seaborn is useful for easily creating standard statistical charts such as box plots, charts with regression lines, etc. Check out the example gallery and Tutorial
- For interactive visualizations, take a look at Vega-Altair, Bokeh, and Plotly.