Before we start
|
Python is an open source and platform independent programming language.
Jupyter Notebook and the Spyder IDE are great tools to code in and interact with Python. With the large Python community it is easy to find help on the internet.
|
Short Introduction to Programming in Python
|
Python is an interpreted language which can be used interactively (executing one command at a time) or in scripting mode (executing a series of commands saved in file).
One can assign a value to a variable in Python. Those variables can be of several types, such as string, integer, floating point and complex numbers.
Lists and tuples are similar in that they are ordered lists of elements; they differ in that a tuple is immutable (cannot be changed).
Dictionaries are data structures that provide mappings between keys and values.
|
Starting With Data
|
Libraries enable us to extend the functionality of Python.
Pandas is a popular library for working with data.
A Dataframe is a Pandas data structure that allows one to access data by column (name or index) or row.
Aggregating data using the groupby() function enables you to generate useful summaries of data quickly.
Plots can be created from DataFrames or subsets of data that have been generated with groupby() .
|
Indexing, Slicing and Subsetting DataFrames in Python
|
In Python, portions of data can be accessed using indices, slices, column headings, and condition-based subsetting.
Python uses 0-based indexing, in which the first element in a list, tuple or any other data structure has an index of 0.
Pandas enables common data exploration steps such as data indexing, slicing and conditional subsetting.
|
Making Plots With matplotlib/seaborn
|
|
Data Workflows and Automation
|
Loops help automate repetitive tasks over sets of items.
Loops combined with functions provide a way to process data more efficiently than we could by hand.
Conditional statements enable execution of different operations on different data.
Functions enable code reuse.
|