100 pandas puzzles

I’ve started compiling a list of short pandas puzzles of varying difficulty. You can find it over on GitHub here.

There are already some great guides to pandas out there (not least in the official documents themselves) but nothing...

Read More

Picking magic numbers for numpy.in1d

If you’ve played about with NumPy before, you’ll probably know that given two arrays of numbers, ar1 and ar2, the function in1d returns a boolean array indicating whether or not each number in ar1 appears...

Read More

Python power towers

If you have a list of numbers, say [3, 2, 2, 2], what’s the best way to turn it into a power tower?

In other words, the aim is to take the list and calculate the answer to Read More

A basic introduction to NumPy's einsum

The einsum function is one of NumPy’s jewels. It can often outperform familiar array functions in terms of speed and memory efficiency, thanks to its expressive power and smart loops. On the downside, it can take a little while...

Read More

The colour of the Internet

What colour is the Internet? Probably green or blue, judging by the colours that appear most often in domain names.

The graph below shows 12 colours and the number of times each one appears in .com and .net domain names....

Read More

Future Plans

Welcome!

Whenever I stumble across something interesting and I can condense it into a short blog post, it will go on this site.

Alex

Read More