1. Foundations and I/O
The Pandas library (imported as import pandas as pd) provides the DataFrame, a two-dimensional, size-mutable, tabular data structure with labeled rows and columns. Think of it as a...
Read full chapter →The essential Pandas DataFrame Operations cheat sheet: 7 concise chapters you can read in minutes, distilled from the full deck. When you're ready, drill the flashcards or test yourself under exam conditions.
The Pandas library (imported as import pandas as pd) provides the DataFrame, a two-dimensional, size-mutable, tabular data structure with labeled rows and columns. Think of it as a...
Read full chapter →Before manipulating a DataFrame you usually inspect it. df.head() and df.tail(n) peek at the first and last rows (default five). df.shape returns a tuple (n_rows, n_cols), df.colum...
Read full chapter →Adding a column is as simple as assigning to a new key: df['new'] = df['a'] + df['b']. To remove one, use df.drop('col', axis=1) or the in-place shortcut del df['col']. Renaming is...
Read full chapter →The quickest overview of a numeric frame is df.describe(), which returns count, mean, standard deviation, min, quartiles, and max for every numeric column. For individual reduction...
Read full chapter →Real datasets are rarely clean. df.isna() produces a boolean DataFrame marking every NaN cell, and df.isna().sum() counts NaNs per column so you can see where the holes are. To det...
Read full chapter →The Split-Apply-Combine paradigm is encoded in df.groupby('key'). After grouping, aggregations like df.groupby('key').mean(numeric_only=True) or .sum() collapse each group into a s...
Read full chapter →Date handling is a first-class concern in Pandas. Strings become datetimes with pd.to_datetime(df['date_str']), optionally sped up by passing an explicit format='%Y-%m-%d'. Once a...
Read full chapter →Done reading?
Test yourself with the Pandas DataFrame Operations practice exam — timed questions, instant score, full review of wrong answers. Free.
🎯 Take the Practice Exam →