Knowledge base / Python

Python: pandas and NumPy with examples

The most useful pandas and NumPy methods: reading data, cleaning, joining tables, grouping and time series.

100 entries

The Python entries focus on pandas, the library for working with tables: reading files, cleaning, joining, grouping and time series. Separate groups cover NumPy, which pandas is built on.

pandas changes faster than Excel or SQL. Some methods that used to be standard have been removed. DataFrame.append is one example; pandas.concat replaces it. If code from a tutorial raises a FutureWarning or an error, check the library version with pd.__version__ and compare the behaviour with the documentation for that version.

If you are new to Python, start with Python basics. It goes from a variable to a small pandas report, and the entries in this section help you expand each step.

pandas: reading and writing 8

pandas: structure and inspection 11

pandas: cleaning and types 14

pandas: selecting, filtering and sorting 11

pandas: combining and reshaping 12

pandas: grouping and calculations 10

pandas: time series and windows 4

NumPy: creating arrays 8

NumPy: shape and joining 10

NumPy: selection, conditions and maths 12

Kajo Rudziński

Newsletter KajoData

Let’s keep in touch.

I write about data analysis, learning and changing careers. My newsletter and the sign-up form are in Polish. If that works for you, I’d be glad to see you there.