About the Code

Pandas Brain Teasers — by Miki Tebeka (5 / 34)

The Pragmatic Programmers
The Pragmatic Programmers

--

👈 About the Author | TOC | About You 👉

You can find the brain teasers code at https://pragprog.com/titles/d-pandas/pandas-brain-teasers/.

I’ve tried to keep the code as short as possible and remove anything that is not related to the teaser. This is not how you’ll normally write code.

Some code examples are shown in the IPython interactive prompt. You should write the following two imports in your IPython session to follow the examples:

​ In [1]: ​import​ ​pandas​ ​as​ ​pd​
​ In [2]: ​import​ ​numpy​ ​as​ ​np​

When referring to a brain teaser, I assume you ran the code with the %run magic. For example

​ In [3]: %run sanchez.py

This will load all the variables defined in the file into your IPython, even if there was an exception.

👈 About the Author | TOC | About You 👉

Pandas Brain Teasers by Miki Tebeka can be purchased in other book formats directly from the Pragmatic Programmers. If you notice a code error or formatting mistake, please let us know here so that we can fix it.

--

--

The Pragmatic Programmers
The Pragmatic Programmers

We create timely, practical books and learning resources on classic and cutting-edge topics to help you practice your craft and accelerate your career.