• Live notes about this tutorial are available at this link

Pandas

A smarter and more abstract tool to handle .csv files is another Python tool named Pandas

We use Pandas to:

  1. Manipulate data.
  2. Visualize and plot data combined with matplotlib library

Install Pandas and Matplotlib

Install pandas following the instruction available at this web page.

Install matplotlib following the instruction available at this web page.

Manipulate and Visualize data

Let us take a look at this presentation.

Keeping Pandas API Documentation at hand with this link, let us see Pandas in action now:

  1. Create a file named ManipulateVisualize.ipynb
  2. Run the Jupiter Notebook in Visual Studio Code (more details here) on the .csv dataset Salary Data.csv
  3. Follow and repeat my instructions on your Jupiter!

Exercises

Complete this exercise on Jupiter Notebook on the same dataset.

Recursion

Recursion is a way of programming or coding a problem, in which a function calls itself one or more times in its body. Usually, it is returning the return value of this function call. If a function definition fulfils the condition of recursion, we call this function a recursive function.

Remember, the termination condition:

  1. A recursive function has to terminate to be used in a program.
  2. A base case is a case, where the problem can be solved without further recursion. Tips: start by identifying the base case.
  3. A recursive function terminates, if with every recursive call the solution of the problem is downsized and moves towards a base case.

Solve this exercise on Rosalind with a recursive approach.