chiphuyen/just-pandas-things

An ongoing list of pandas quirks

Jupyter Notebook

1,005

15 commits

updated May 8, 2023

See the code

README

just-pandas-things

This repo contains a few peculiar things I've learned about pandas that have made my life easier and my code faster. This post isn't a friendly tutorial for beginners, but a friendly introduction to pandas weirdness.

What's in this repo?

  1. pandas is column-major, which is why row-based operations are slow
  2. SettingWithCopyWarning, or why we can't have nice things
  3. Indexing and slicing
  4. Accessors
  5. Data exploration
  6. Common pitfalls

I'll continue updating this repo as I have more time. As I'm still learning pandas quirks, feedback is much appreciated.

Thanks Luke Metz, Vikram Tiwari, and Karson Elmgren for reviewing!

data-science
machine-learning
pandas
pandas-dataframe
pandas-tutorial
python

chiphuyen/just-pandas-things

An ongoing list of pandas quirks

Jupyter Notebook

1,005

15 commits

updated May 8, 2023

See the code

README

just-pandas-things

This repo contains a few peculiar things I've learned about pandas that have made my life easier and my code faster. This post isn't a friendly tutorial for beginners, but a friendly introduction to pandas weirdness.

What's in this repo?

  1. pandas is column-major, which is why row-based operations are slow
  2. SettingWithCopyWarning, or why we can't have nice things
  3. Indexing and slicing
  4. Accessors
  5. Data exploration
  6. Common pitfalls

I'll continue updating this repo as I have more time. As I'm still learning pandas quirks, feedback is much appreciated.

Thanks Luke Metz, Vikram Tiwari, and Karson Elmgren for reviewing!

data-science
machine-learning
pandas
pandas-dataframe
pandas-tutorial
python

Significant stargazers

Justin Spahr-Summers

3,844 followers · starred Nov 2020

mani

571 followers · starred Jan 2021

Tolga Cangöz

120 followers · starred May 2023

Noa Tamir

110 followers · starred Nov 2020