Image for post
Image for post

Python has a rich collection of built-in data structures. These data structures are sometimes called “containers” or “collections” because they contain a collection of individual items. These structures cover a wide variety of common programming situations. In this recipe, we’ll look at how we can update a set by removing or replacing items.

This article is an excerpt from the book Modern Python Cookbook, Second Edition by Steven F Lott. …


Image for post
Image for post

A good visualization should capture the interest of the audience and make an impression. Few things capture interest more than bright colors and movement. In this post, I’m going to show you exactly how to make an animated gif, so that you can go farm some internet points on /r/dataisbeautiful, maybe.

Here’s what we’re going to make:

Image for post
Image for post

Step 0 — Data for making an animated gif

Before you make a graph, you’ve gotta get your hands on some data. I grabbed some business data from StatsCanada available here. The data isn’t in the best shape, so here’s a pinch of pandas to make it suck less:

import pandas as…

About

ODSC - Open Data Science

Our passion is bringing thousands of the best and brightest data scientists together under one roof for an incredible learning and networking experience.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store