{{ message }}

# kgdunn / python-basic-notebooks Public

Basic Python learning - notebooks

Switch branches/tags
Nothing to show

## Files

Failed to load latest commit information.

# Learning Python: basic level

Python can be used in many areas of application, but these notebooks, as you will see, have examples primarily from science, engineering, life sciences, and applied mathematics.

The topics listed below give an idea of what is covered. Within in each notebook are a series of simple or more challenging problems. The problems are designed to build on the topics just learned, as well as the topics from earlier notebooks.

Notebook 1: https://yint.org/pybasic01

• Printing output to the screen
• Creating variables
• Variable types
• Calculations with variables
• Built-in constants and mathematical functions

Notebook 2: https://yint.org/pybasic02

• Strings
• Lists
• For loops: iterating
• Commenting and variable names

Notebook 3: https://yint.org/pybasic03

• From strings to lists to strings to lists
• If and else if branching in code
• Creating errors, checking for errors and handling errors
• Challenge problems

Notebook 4: https://yint.org/pybasic04

• Introducing vectors, matrices and arrays.
• Using NumPy to create various vectors, matrices and arrays, containing specific values.
• Get everyone to more or less the same level of understanding.

Notebook 5: https://yint.org/pybasic05

• Mathematical operations (addition, multiplication, matrix math) on arrays.
• Challenge problems that require using vectors and matrices.

Notebook 6: https://yint.org/pybasic06

• Functions with single inputs, or multiple inputs: arguments based on their position, or name.
• Functions with no (None) or single outputs, and multiple outputs in a tuple.
• Challenge problems that recall work from prior modules, and apply your knowledge.

Notebook 7: https://yint.org/pybasic07

• Dictionary objects in Python: the very basics.
• Introducing Pandas' two main classes: Series and DataFrame: what they are, and how to use them.

Notebook 8: https://yint.org/pybasic08

• Iterating over entries in a dictionary.
• Getting and setting values in dictionaries.
• Reading data from many CSV or Excel files.
• Moving average calculations.

Notebook 9: https://yint.org/pybasic09

• Statistics and Data Visualization: combined
• Box plots; mean, median, percentiles
• Bar plots; categorical vs numeric variables
• Histograms; visualizing distribution and Central Limit Theorem

Notebook 10: https://yint.org/pybasic10

• Goals of your data analysis project broken down
• Data tables; correlations; pie charts are not so useful
• Time-series; trends, induced delay from a moving average, random walks
• Scatter plots; showing 5 variables in 1 plot
• Extending the box plot: violin, swarm and raincloud plots

# Learning Python: focus on getting results

In these series of 6 notebooks the focus is for people with some/minimal experience in coding (e.g. MATLAB, C++) to get started with Python. The target audience is process engineers and scientists. People that need to get some sort of value extracted from their data.

As such, it does not teach loops, branching, data structures, etc. In other words, the theoretical computer science concepts are introduced as needed, but not explicitly.

Notebook 11: https://yint.org/pybasic11

• Printing output to the screen
• Creating variables, and basic calculations with them
• Lists

Notebook 12: https://yint.org/pybasic12

• Using and understanding the Pandas library
• Creating Pandas series and data frames and basic calculations with them
• Reading in Excel files with Pandas and basic calculation

Notebook 13: https://yint.org/pybasic13

• Becoming more comfortable with Pandas data processing
• Shape of data, unique values, adding/removing data, merging dataframes, sorting data
• Basic plotting with Pandas: box plot, time series and scatter plots

Notebook 14: https://yint.org/pybasic14

• For loops, for when we need to do things over and over
• The `groupby` function, for repeated actions on sub-groups of your data
• Calculating the correlation matrix

Notebook 15: https://yint.org/pybasic15

• Visualize the correlation matrix (2D histograms)
• Using the `LinearRegression` tool from `scikit-learn`
• The `.iloc` function in Pandas to split data into testing and training subset
• Using `seaborn` to visualize regression models

Notebook 16: https://yint.org/pybasic16

• Pandas collection: reading in subsets of data
• Handling missing values with Pandas
• Filtering data, and the multi-level groupby capability of Panda
• Effective table display in Pandas

Basic Python learning - notebooks