Loading tutorials
Series and know basic Python lists and dictionaries. If pd.Series([10, 20, 30]) is new to you, review the previous chapter first.4 min readread_csv to load a table from text, control how columns are typed, and write results back out. The chapter runs about 1,200 words, and every example runs as shown.4 min readKeyError or silently4 min readloc and iloc for selection. It builds on those to show how to choose rows by condition. You will learn how a mask is built, how to combine conditions, and which errors come up most often.4 min readloc, iloc, and boolean masks. It covers how pandas applies an operation to a whole column at once, which methods you will use most, and the mistakes that slow code down or give wrong answers.4 min readNaN (pandas's marker for a missing value). It also shows how to predict that result and control it.4 min readloc and boolean masks, and know that arithmetic aligns on the index. Real tables have gaps, and pandas has specific rules for how it stores, skips, and propagates them. Knowing those rules keeps a quietly wrong average from r4 min read[], and use loc with boolean masks. It also assumes you know that arithmetic on Series is vectorized and matches values by Index label. You will now create new columns, change existing ones, and avoid the usual errors.4 min readsort_values and sort_index on a Series and a DataFrame. It assumes you can build a DataFrame, select with loc and iloc, and know that every row has an index label. Sorting is a short topic, but it interacts with labels, missing values, and positional selection in ways tha4 min read[], loc, and iloc, filter with boolean masks, and add columns with assignment. You should also know that a Python name is a reference to an object, not the object itself. Here you will learn when pandas shares data between objects, when it copies, and w4 min read[] and loc, and read a boolean mask. It also assumes you know how NaN appears in a column. The examples run on pandas 2.x.5 min readpd.concat and DataFrame.merge, and the mistakes that most often go wrong with them.4 min readloc, build a groupby summary, and read a DataFrame that has a MultiIndex only at a basic level. Reshaping changes how a table is laid out without changing the facts in it. You will move between two layouts:4 min readdf.dtypes, convert with astype, and use groupby. It covers how to measure what a DataFrame costs in memory and how to pick dtypes that make it smaller and faster, without introducing silent bugs.5 min read