January 2, 2019

Tutorial: Advanced Jupyter Notebooks

Lying at the heart of modern data science and analysis is the Jupyter project lifecycle. Whether you're rapidly prototyping ideas, demonstrating your work, or producing fully fledged reports, notebooks can provide an efficient edge over IDEs or traditional desktop applications.

Following on from Jupyter Notebook for Beginners: A Tutorial, this guide will be a Jupyter Notebooks tutorial that takes you on a journey from the truly vanilla to the downright dangerous. That's right! Jupyter's wacky world of out-of-order execution has the power to faze, and when it comes to running notebooks inside notebooks, things can get complicated fast.

This Jupyter Notebooks tutorial aims to straighten out some sources of confusion and spread ideas that pique your interest and spark your imagination. There are already plenty of great listicles of neat tips and tricks, so here we will take a more thorough look at Jupyter's offerings.

This will involve:

  • Warming up with the basics of shell commands and some handy magics, including a look at debugging, timing, and executing multiple languages.
  • Exploring topics like logging, macros, running external code, and Jupyter extensions.
  • Seeing how to enhance charts with Seaborn, beautify notebooks with themes and CSS, and customise notebook output.
  • Finishing off with a deep look at topics like scripted execution, automated reporting pipelines, and working with databases.

If you're a JupyterLab fan, you'll be pleased to hear that 9

Now we're ready to become Jupyter wizards!

Shell Commands

Every user will benefit at least from time-to-time from the ability to interact directly with the operating system from within their notebook. Any line in a code cell that you begin with an exclamation mark will be executed as a shell command. This can be useful when dealing with datasets or other files, and managing your Python packages. As a simple illustration:

<code="language-python">!echo Hello World!!
pip freeze | grep pandas
</code="language-python">
<code="language-python">
Hello World!
pandas==0.23.4
</code="language-python">

It is also possible to use Python variables in your shell commands by prepending a $ symbol consistent with bash style variable names.

<code="language-python">
message = 'This is nifty'
!echo $message
</code="language-python">
<code="language-python">
This is nifty
</code="language-python">

Note that the shell in which ! commands are executed is discarded after execution completes, so commands like cd will have no effect. However, IPython magics offer a solution.

Basic Magics

Magics are handy commands built into the IPython kernel that make it easier to perform particular tasks. Although they often resemble unix commands, under the hood they are all implemented in Python. There exist far more magics than it would make sense to cover here, but it's worth highlighting a variety of examples. We will start with a few basics before moving on to more interesting cases.

There are two categories of magic: line magics and cell magics. Respectively, they act on a single line or can be spread across multiple lines or entire cells. To see the available magics, you can do the following:

<code="language-python">
<code="language-python">Available line magics:

Available cell magics
Automagic is ON,

As you can see, there are loads! Most are listed in the official documentation, which is intended as a reference but can be somewhat obtuse in places. Line magics start with a percent character It's worth noting that ! is really just a fancy magic syntax for shell commands, and as you may have noticed IPython provides magics in place of those shell commands that alter the state of the shell and are thus lost by !. Examples include Let's go through some more examples.

Autosaving

First up, the <code="language-python">

<code="language-python">Autosaving every 60 seconds</code="language-python">

It's that easy!

Displaying Matplotlib Plots

One of the most common line magics for data scientists is surely <code="language-python">

Providing the inline argument instructs IPython to show Matplotlib plot images inline, within your cell outputs, enabling you to include charts inside your notebooks. Be sure to include this magic before you import Matplotlib, as it may not work if you do not; many import it at the start of their notebook, in the first code cell.

Now, let's start looking at some more complex features.

Debugging

The more experienced reader may have had concerns over the ultimate efficacy of Jupyter Notebooks without access to a debugger. But fear not! The IPython kernel has its own interface to the Python debugger, pdb, and several options for debugging with it in your notebooks. Executing the <code="language-python"> raise NotImplementedError() </code="language-python">

<code="language-python">
Automatic pdb calling has been turned ON
--------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
<ipython-input-31-022320062e1f> in <module>()
1 get_ipython().run_line_magic('pdb', '')
----> 2 raise NotImplementedError()
NotImplementedError:
> <ipython-input-31-022320062e1f>(2)<module>()
1 get_ipython().run_line_magic('pdb', '')
----> 2 raise NotImplementedError()
</code="language-python">

This exposes an interactive mode in which you can use the pdb commands.

Another handy debugging magic is As an aside, also note how the traceback above demonstrates how magics are translated directly into Python commands, where Timing Execution

Sometimes in research, it is important to provide runtime comparisons for competing approaches. IPython provides the two timing magics <code="language-python"> n = 1000000 </code="language-python">

<code="language-python">
Wall time: 32.9 ms
499999500000
</code="language-python">

And in cell mode:

<code="language-python">

total = 0
for i in range(n):
total += i
</code="language-python">
<code="language-python">
Wall time: 95.8 ms
</code="language-python">

The notable difference of <code="language-python">

<code="language-python">34.9 ms ± 276 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)</code="language-python">

Executing Different Languages

In the output of For example, to render HTML in your notebook:

<code="language-python">
This is <em>really</em> neat!</code="language-python">

This is really neat!

Similarly, LaTeX is a markup language for displaying mathematical expressions, and can be used directly:

<code="language-python">
Some important equations:$E = mc^2$
$e^{i pi} = -1$
</code="language-python">

Some important equations: \(E = mc^2\) \(e^{i \pi} = -1\)

Configuring Logging

Did you know that Jupyter has a built-in way to prominently display custom error messages above cell output? This can be handy for ensuring that errors and warnings about things like invalid inputs or parameterisations are hard to miss for anyone who might be using your notebooks. An easy, customisable way to hook into this is via the standard Python logging module.

(Note: Just for this section, we'll use some screenshots so that we can see how these errors look in a real notebook.)

configuring-logging1-1

The logging output is displayed separately from print statements or standard cell output, appearing above all of this.

configuring-logging2-1

This actually works because Jupyter notebooks listen to both standard output streams, stdout and stderr, but handle each differently; print statements and cell output route to stdout and by default logging has been configured to stream over stderr.

This means we can configure logging to display other kinds of messages over stderr too.

configuring-logging3-1

We can customise the format of these messages like so:

configuring-logging4-1

Note that every time you run a cell that adds a new stream handler via logger.addHandler(handler), you will receive an additional line of output each time for each message logged. We could place all the logging config in its own cell near the top of our notebook and leave it be or, as we have done here, brute force replace all existing handlers on the logger. We had to do that in this case anyway to remove the default handler.

It's also easy to log to an external file, which might come in handy if you're executing your notebooks from the command line as discussed later. Just use a FileHandler instead of a StreamHandler:

<code="language-python">handler = logging.FileHandler(filename='important_log.log', mode='a')</code="language-python">

A final thing to note is that the logging described here is not to be confused with using the Extensions

As it is an open source webapp, plenty of extensions have been developed for Jupyter Notebooks, and there is a long official list. Indeed, in the Working with Databases section below we use the ipython-sql extension. Another of particular note is the bundle of extensions from Jupyter-contrib, which contains individual extensions for spell check, code folding and much more.

You can install and set this up from the command line like so:

<code="language-python">
pip install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
jupyter nbextension enable spellchecker/main
jupyter nbextension enable codefolding/main
</code="language-python">

This will install the jupyter_contrib_nbextensions package in Python, install it in Jupyter, and then enable the spell check and code folding extensions. Don't forget to refresh any notebooks live at the time of installation to load in changes.

Note that Jupyter-contrib only works in regular Jupyter Notebooks, but there are new extensions for JupyterLab now being released on GitHub.

Enhancing Charts with Seaborn

One of the most common exercises Jupyter Notebook users undertake is producing plots. But Matplotlib, Python's most popular charting library, isn't renowned for attractive results despite it's customisability. Seaborn instantly prettifies Matplotlib plots and even adds some additional features pertinent to data science, making your reports prettier and your job easier. It's included in the default Anaconda installation or easily installed via pip install seaborn.

Let's check out an example. First, we'll import our libraries and load some data.

<code="language-python">
import matplotlib.pyplot as plt
import seaborn as sns
data = sns.load_dataset("tips")
</code="language-python">

Seaborn provides some built-in sample datasets for documentation, testing and learning purposes, which we will make use of here. This "tips" dataset is a pandas DataFrame listing some billing information from a bar or restaurant. We can see the size of the total bill, the tip, the gender of the payer, and some other attributes.

<code="language-python">data.head()</code="language-python">
.dataframe tbody tr th:only-of-type { vertical-align: middle; }

.dataframe tbody tr th { vertical-align: top;}.dataframe thead th { text-align: right;}
total_bill tip sex smoker day time size
0 16.99 1.01 Female No Sun Dinner 2
1 10.34 1.66 Male No Sun Dinner 3
2 21.01 3.50 Male No Sun Dinner 3
3 23.68 3.31 Male No Sun Dinner 2
4 24.59 3.61 Female No Sun Dinner 4

We can easily plot total_bill vs tip in Matplotlib.

<code="language-python">plt.scatter(data.total_bill, data.tip);</code="language-python">

Matplotlib scatter plot

Plotting in Seaborn is just as easy! Simply set a style and your Matplotlib plots will automatically be transformed.

<code="language-python">sns.set(style="darkgrid")plt.scatter(data.total_bill, data.tip);</code="language-python">

Seaborn styled scatter plot

What an improvement, and from only one import and a single extra line! Here, we used the darkgrid style, but Seaborn has a total of five built-in styles for you to play with: darkgrid, whitegrid, dark, white, and ticks.

But we don't have to stop with styling: as Seaborn is closely integrated with pandas data structures, its own scatter plot function unlocks additional features.

<code="language-python">sns.scatterplot(x="total_bill", y="tip", data=data);</code="language-python">

Seaborn scatterplot

Now we get default axis labels and an improved default marker for each data point. Seaborn can also automatically group by categories within your data to add another dimension to your plots. Let's change the colour of our markers based on whether the group paying the bill were smokers or not.

<code="language-python">sns.scatterplot(x="total_bill", y="tip", hue="smoker", data=data);</code="language-python">

Another Seaborn scatterplot

That's pretty neat! In fact, we can take this much further, but there's simply too much detail to go into here. As a taster though, let's colour by the size of the party paying the bill while also discriminating between smokers and non-smokers.

<code="language-python">sns.scatterplot(x="total_bill", y="tip", hue="size", style="smoker", data=data);</code="language-python">

Seaborn scatterplot with key

Hopefully it's becoming clear why Seaborn describes itself as a "high-level interface for drawing attractive statistical graphics."

Indeed, it's high-level enough to, for example, provide one-liners for plotting data with a line of best fit (determined through linear regression), whereas Matplotlib relies on you to prepare the data yourself. But if all you need is more attractive plots, it's remarkably customisable; for example, if you aren't happy with the default themes, you can choose from a whole array of standard color palettes or define your own.

For more ways Seaborn allows you to visualise the structure of your data and the statistical relationships within it, check out their examples.

Macros

Like many users, you probably find yourself writing the same few tasks over and over again. Maybe there's a bunch of packages you always need to import when starting a new notebook, a few statistics that you find yourself computing for every single dataset, or some standard charts that you've produced countless times?

Jupyter lets you save code snippets as executable macros for use across all your notebooks. Although executing unknown code isn't necessarily going to be useful for anyone else trying to read or use your notebooks, it's definitely a handy productivity boost while you're prototyping, investigating, or just playing around.

Macros are just code, so they can contain variables that will have to be defined before execution. Let's define one to use.

<code="language-python">name = 'Tim'</code="language-python">

Now, to define a macro we first need some code to use.

<code="language-python">print('Hello,
<code="language-python">Hello, Tim!</code="language-python">

We use the <code="language-python"> %store __hello_world</code="language-python">

<code="language-python">Stored '__hello_world' (Macro)</code="language-python">

The To load the macro from the store, we just run:

<code="language-python">

And to execute it, we merely need to run a cell that solely contains the macro name.

<code="language-python">__hello_world</code="language-python">
<code="language-python">Hello, Tim!</code="language-python">

Let's modify the variable we used in the macro.

<code="language-python">name = 'Ben'</code="language-python">

When we run the macro now, our modified value is picked up.

<code="language-python">__hello_world</code="language-python">
<code="language-python">Hello, Ben!</code="language-python">

This works because macros just execute the saved code in the scope of the cell; if name was undefined we'd get an error.

But macros are far from the only way to share code across notebooks.

Executing External Code

Not all code belongs in a Jupyter Notebook. Indeed, while it's entirely possible to write statistical models or even entire multi-part projects in Jupyter notebooks, this code becomes messy, difficult to maintain, and unusable by others. Jupyter's flexibility is no substitute for writing well-structured Python modules, which are trivially imported into your notebooks.

In general, when your quick notebook project starts to get more serious and you find yourself writing code that is reusable or can be logically grouped into a Python script or module, you should do it! Aside from the fact that you can import your own modules directly in Python, Jupyter also lets you Tasks such as importing the same set of packages over and over for every project project are a perfect candidate for the But enough talk already, let's look at an example! If we create a file imports.py containing the following code:

<code="language-python">

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt</code="language-python">

We can load this simply by writing a one-line code cell, like so:

<code="language-python">

Executing this will replace the cell contents with the loaded file.

<code="language-python">
#

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
</code="language-python">

Now we can run the cell again to import all our modules and we're ready to go.

The <code="language-python"> import numpy as np import matplotlib.pyplot as plt import seaborn as sns sns.set(style="darkgrid") if __name__ == '__main__': h = plt.hist(np.random.triangular(0, 5, 9, 1000), bins=100, linewidth=0) plt.show()</code="language-python">

When executed via <code="language-python">

Histogram

<code="language-python"><matplotlib.figure.Figure at 0x2ace50fe860></code="language-python">

If you wish to pass arguments to a script, simply list them explicitly after the filename Scripted Execution

Although the foremost power of Jupyter Notebooks emanates from their interactive flow, it is also possible to run notebooks in a non-interactive mode. Executing notebooks from scripts or the command line provides a powerful way to produce automated reports or similar documents.

Jupyter offers a command line tool that can be used, in its simplest form, for file conversion and execution. As you are probably aware, notebooks can be converted to a number of formats, available from the UI under "File > Download As", including HTML, PDF, Python script, and even LaTeX. This functionality is exposed on the command line through an API called nbconvert. It is also possible to execute notebooks within Python scripts, but this is already well documented and the examples below should be equally applicable.

It's important to stress, similarly to On the Command Line

It will become clear later how nbconvert empowers developers to create their own automated reporting pipelines, but first let's look at some simple examples. The basic syntax is:

<code="language-python">jupyter nbconvert --to <format> notebook.ipynb</code="language-python">

For example, to create a PDF, simply write:

<code="language-python">jupyter nbconvert --to pdf notebook.ipynb</code="language-python">

This will take the currently saved static content of notebook.ipynb and create a new file called notebook.pdf. One caveat here is that to convert to PDF requires that you have pandoc (which comes with Anaconda) and LaTeX (which doesn't) installed. Installation instructions depend on your operating system.

By default, nbconvert doesn't execute your notebook code cells. But if you also wish to, you can specify the --execute flag.

<code="language-python">jupyter nbconvert --to pdf --execute notebook.ipynb</code="language-python">

A common snag arises from the fact that any error encountered running your notebook will halt execution. Fortunately, you can throw in the --allow-errors flag to instruct nbconvert to output the error message into the cell output instead.

<code="language-python">jupyter nbconvert --to pdf --execute --allow-errors notebook.ipynb</code="language-python">

Parameterization with Environment Variables

Scripted execution is particularly useful for notebooks that don't always produce the same output, such as if you are processing data that change over time, either from files on disk or pulled down via an API. The resulting documents can easily be emailed to a list of subscribers or uploaded to Amazon S3 for users to download from your website, for example.

In such cases, it's quite likely you may wish to parameterize your notebooks in order to run them with different initial values. The simplest way to achieve this is using environment variables, which you define before executing the notebook.

Let's say we want to generate several reports for different dates; in the first cell of our notebook, we can pull this information from an environment variable, which we will name REPORT_DATE. The <code="language-python">report_date =

Then, to run the notebook (on UNIX systems) we can do something like this:

<code="language-python">REPORT_DATE=2018-01-01 jupyter nbconvert --to html --execute report.ipynb</code="language-python">

As all environment variables are strings, we will have to parse them to get the data types we want. For example:

<code="language-python">
A_STRING="Hello, Tim!"
AN_INT=42
A_FLOAT=3.14
A_DATE=2017-12-31 jupyter nbconvert --to html --execute example.ipynb</code="language-python">

And we simply parse like so:

<code="language-python">
import datetime as dt
the_str =
int_str =
my_int = int(int_str)
float_str =
my_float = float(float_str)
date_str =
my_date = dt.datetime.strptime(date_str, 
</code="language-python">

Parsing dates is definitely less intuitive than other common data types, but as usual there are several options in Python.

On Windows

If you'd like to set your environment variables and run your notebook in a single line on Windows, it isn't quite as simple:

<code="language-python">cmd /C "set A_STRING=Hello, Tim!&& set AN_INT=42 && set A_FLOAT=3.14 && set A_DATE=2017-12-31&& jupyter nbconvert --to html --execute example.ipynb"</code="language-python">

Keen readers will notice the lack of a space after defining A_STRING and A_DATE above. This is because trailing spaces are significant to the Windows set command, so while Python will successfully parse the integer and the float by first stripping whitespace, we have to be more careful with our strings.

Parameterization with Papermill

Using environment variables is fine for simple use-cases, but for anything more complex there are libraries that will let you pass parameters to your notebooks and execute them. With over 1000 stars on GitHub, probably the most popular is Papermill, which can be installed with pip install papermill.

Papermill injects a new cell into your notebook that instantiates the parameters you pass in, parsing numeric inputs for you. This means you can just use the variables without any extra set-up (though dates still need to be parsed). Optionally, you can create a cell in your notebook that defines your default parameter values by clicking "View > Cell Toolbar > Tags" and adding a "parameters" tag to the cell of your choice.

Our earlier example that produced an HTML document now becomes:

<code="language-python">papermill example.ipynb example-parameterised.ipynb -p my_string "Hello, Tim!" -p my_int 3 -p my_float 3.1416 -p a_date 2017-12-31
jupyter nbconvert example-parameterised.ipynb --to html --output example.html</code="language-python">

We specify each parameter with the -p option and use an intermediary notebook so as not to change the original. It is perfectly possible to overwrite the original example.ipynb file, but remember that Papermill will inject a parameter cell.

Now our notebook set-up is much simpler:

<code="language-python">
# my_string, my_int, and my_float are already defined!
import datetime as dt
my_date = dt.datetime.strptime(a_date, 
</code="language-python">

Our brief glance so far uncovers only the tip of the Papermill iceberg. The library can also execute and collect metrics across notebooks, summarise collections of notebooks, and it provides an API for storing data and Matplotlib plots for access in other scripts or notebooks. It's all well documented in the GitHub readme, so there's no need to reiterate here.

It should now be clear that, using this technique, it is possible to write shell or Python scripts that can batch produce multiple documents and be scheduled via tools like crontab to run automatically on a schedule. Powerful stuff!

Styling Notebooks

If you're looking for a particular look-and-feel in your notebooks, you can create an external CSS file and load it with Python.

<code="language-python">
from IPython.display import HTML
HTML('<style>{}</style>'.format(open('custom.css').read()))</code="language-python">

This works because IPython's HTML objects are inserted directly into the cell output div as raw HTML. In fact, this is equivalent to writing an HTML cell:

<code="language-python">

<style>.css-example { color: darkcyan; }</style></code="language-python">

To demonstrate that this works let's use another HTML cell.

<code="language-python">
<span class='css-example'>This text has a nice colour</span></code="language-python">

This text has a nice colour

Using HTML cells would be fine for one or two lines, but it will typically be cleaner to load an external file as we first saw.

If you would rather customise all your notebooks at once, you can write CSS straight into the ~/.jupyter/custom/custom.css file in your Jupyter config directory instead, though this will only work when running or converting notebooks on your own computer.

Indeed, all of the aforementioned techniques will also work in notebooks converted to HTML, but will not work in converted PDFs.

To explore your styling options, remember that as Jupyter is just a web app you can use your browser's dev tools to inspect it while it's running or delve into some exported HTML output. You will quickly find that it is well-structured: all cells are designated with the cell class, text and code cells are likewise respectively demarked with text_cell and code_cell, inputs and outputs are indicated with input and output, and so on.

There are also various different popular pre-designed themes for Jupyter Notebooks distributed on GitHub. The most popular is jupyterthemes, which is available via pip install jupyterthemes and it's as simple as running jt -t monokai to set the "monokai" theme. If you're looking to theme JupyterLab instead, there is a growing list of options popping up on GitHub too.

Hiding Cells

Although it's bad practice to hide parts of your notebook that would aid other people's understanding, some of your cells may not be important to the reader. For example, you might wish to hide a cell that adds CSS styling to your notebook or, if you wanted to hide your default and injected Papermill parameters, you could modify your nbconvert call like so:

<code="language-python">jupyter nbconvert example-parameterised.ipynb --to html --output example.html --TagRemovePreprocessor.remove_cell_tags="{'parameters', 'injected-parameters'}"</code="language-python">

In fact, this approach can be applied selectively to any tagged cells in your notebook, making the TagRemovePreprocessor configuration quite powerful. As an aside, there are also a host of other ways to hide cells in your notebooks.

Working with Databases

Databases are a data scientist's bread and butter, so smoothing the interface between your databases and notebooks is going to be a real boon. Catherine Devlin's IPython SQL magic extension let's you write SQL queries directly into code cells with minimal boilerplate as well as read the results straight into pandas DataFrames. First, go ahead and:

<code="language-python">pip install ipython-sql</code="language-python">

With the package installed, we start things off by executing the following magic in a code cell:

<code="language-python">

This loads the ipython-sql extension we just installed into our notebook. Let's connect to a database!

<code="language-python">
<code="language-python">'Connected: @None'</code="language-python">

Here, we just connected to a temporary in-memory database for the convenience of this example, but you'll probably want to specify details appropriate to your database. Connection strings follow the SQLAlchemy standard:

<code="language-python">dialect+driver://username:password@host:port/database</code="language-python">

Yours might look more like postgresql://scott:tiger@localhost/mydatabase, where driver is postgresql, username is scott, password is tiger, host is localhost and the database name is mydatabase.

Note that if you leave the connection string empty, the extension will try to use the DATABASE_URL environment variable; read more about how to customise this in the Scripted Execution section above.

Next, let's quickly populate our database from the tips dataset from Seaborn we used earlier.


tips = sns.load_dataset("tips")
%sql PERSIST tips
<code="language-python">
* sqlite://
'Persisted tips'</code="language-python">

We can now execute queries on our database. Note that we can use a multiline cell magic <code="language-python"> SELECT * FROM tips LIMIT 3</code="language-python">

<code="language-python">
* sqlite://
Done.
</code="language-python">
<code="language-python"> meal_time = 'Dinner' </code="language-python">
<code="language-python">
* sqlite://
Done.
</code="language-python">
<code="language-python"> result = larger_bills = result.DataFrame() larger_bills.head(3) </code="language-python">
<code="language-python">
* sqlite://
Done.
</code="language-python">
.dataframe tbody tr th:only-of-type { vertical-align: middle; }

.dataframe tbody tr th { vertical-align: top;}.dataframe thead th { text-align: right;}
index total_bill tip sex smoker day time size
0 2 21.01 3.50 Male No Sun Dinner 3
1 3 23.68 3.31 Male No Sun Dinner 2
2 4 24.59 3.61 Female No Sun Dinner 4

And as you can see, converting to a pandas DataFrame was easy too, which makes plotting results from our queries a piece of cake. Let's check out some 9

<code="language-python">
sns.lmplot(x="total_bill", y="tip", hue="smoker", data=larger_bills);
</code="language-python">

9
<p>The <code>ipython-sql</code> extension also integrates with Matplotlib to let you call <code>.plot()</code>, <code>.pie()</code>, and <code>.bar()</code> straight on your query result, and can dump results direct to a CSV file via <code>.csv(filename='my-file.csv')</code>. Read more on the <a href=GitHub readme.

Wrapping Up

From the start of the Jupyter Notebooks tutorial for beginners through to here, we've covered a wide range of topics and really laid the foundations for what it takes to become a Jupyter master. These articles aim serve as a demonstration of the breadth of use-cases for Jupyter Notebooks and how to use them effectively. Hopefully, you have gained a few insights for your own projects!

There's still a whole host of other things we can do with Jupyter notebooks that we haven't covered, such as

Benjamin Pryke

About the author

Benjamin Pryke

Python and web developer with a background in computer science and machine learning. Co-founder of FinTech firm Machina Capital. Part-time gymnast and digital bohemian.

Learn data skills for free

Headshot Headshot

Join 1M+ learners

Try free courses