🌍 freeCodeCamp · subject
freeCodeCamp Data Analysis with Python Syllabus
Every chapter and topic of Data Analysis with Python examined in freeCodeCamp — 4 chapters, 14 topics, plus 50 flashcards written against it.
Data Analysis with Python syllabus — full chapter and topic list
Expand any chapter to see its topics and sub-topics. This is the whole examinable outline for Data Analysis with Python in freeCodeCamp, not a summary of it.
-
NumPy
3 topics- Arrays and Vectorization
- Indexing and Slicing
- Array Operations
-
Pandas
4 topics- Series and DataFrames
- Cleaning and Transforming Data
- Grouping and Aggregation
- Reading and Writing Data
-
Data Visualization
2 topics- Matplotlib
- Seaborn
-
Certification Projects
5 topics- Mean-Variance-Standard Deviation Calculator
- Demographic Data Analyzer
- Medical Data Visualizer
- Page View Time Series Visualizer
- Sea Level Predictor
Data Analysis with Python flashcards for freeCodeCamp
20 of 50 cards from the Data Analysis with Python deck — real questions with worked answers.
What is a NumPy ndarray and how does it differ from a Python list?
An ndarray is a fixed-size, N-dimensional array whose elements are all the same data type (dtype) stored in contiguous memory. Unlike Python lists, it supports fast vectorized element-wise operations implemented in C, uses far less memory, and cannot mix types.
What is vectorization in NumPy and why is it faster than a Python for-loop?
Vectorization means applying an operation to an entire array at once (e.g., $a + b$, $a^{2}$) instead of looping element by element. The loop is executed in optimized, compiled C code with contiguous memory access, avoiding Python's per-element interpreter overhead.
Name the NumPy functions to create: an array of zeros, an array of evenly spaced values with a step, and an array of $n$ evenly spaced values between two endpoints.
np.zeros(shape) creates zeros; np.arange(start, stop, step) creates values with a fixed step (stop excluded); np.linspace(start, stop, n) creates exactly $n$ evenly spaced values including both endpoints.
What is broadcasting in NumPy?
Broadcasting is the rule set that lets NumPy operate on arrays of different shapes: dimensions are compared from the right, and two dimensions are compatible if they are equal or one of them is 1, in which case the size-1 dimension is stretched. Example: a $3 \times 3$ matrix plus a length-3 row vector adds the vector to every row.
In NumPy, what do the array attributes shape, ndim, size, and dtype tell you?
shape: a tuple of the array's dimensions (e.g., $(3, 4)$); ndim: the number of dimensions/axes; size: the total number of elements ($3 \times 4 = 12$); dtype: the data type of the elements (e.g., int64, float64).
How do you select the element in row 1, column 2 of a 2-D NumPy array a, and what does a[0] return?
Use a[1, 2] (comma-separated indices, zero-based). a[0] returns the entire first row as a 1-D array.
What does the slice a[start:stop:step] return, and is the stop index included?
It returns elements from index start up to but NOT including stop, taking every step-th element. Omitted parts default to start=0, stop=len, step=1; a negative step (e.g., a[::-1]) reverses the array.
What is boolean (mask) indexing in NumPy/pandas? Give an example.
Selecting elements with a boolean array of the same shape: a[a > 5] returns only the elements greater than 5. The comparison a > 5 is itself vectorized and produces a boolean mask; masks combine with & (and), | (or), ~ (not), each condition in parentheses.
Key difference between slicing a NumPy array and fancy/boolean indexing: which returns a view and which returns a copy?
Basic slicing returns a VIEW — modifying the slice modifies the original array. Fancy indexing (with integer arrays) and boolean indexing return a COPY, so changes do not affect the original.
In pandas, what is the difference between .loc and .iloc?
.loc selects by LABEL (index/column names) and its slices are inclusive of the stop label; .iloc selects by integer POSITION (zero-based) and its slices exclude the stop position, like Python slicing.
What does it mean that NumPy arithmetic operators like +, -, *, / are element-wise, and how do you do true matrix multiplication?
a * b multiplies corresponding elements: $c_{ij} = a_{ij} \, b_{ij}$ (Hadamard product). Matrix multiplication uses the @ operator or np.dot: $(AB)_{ij} = \sum_{k} a_{ik} b_{kj}$.
In NumPy aggregation functions on a 2-D array, what do axis=0 and axis=1 mean?
axis=0 collapses the rows, computing the statistic down each COLUMN (result has one value per column); axis=1 collapses the columns, computing across each ROW (one value per row). No axis argument aggregates over the entire flattened array.
What are NumPy universal functions (ufuncs)? Give three examples.
Ufuncs are functions that operate element-wise on arrays with broadcasting support, e.g., np.sqrt ($\sqrt{x}$), np.exp ($e^{x}$), np.log ($\ln x$), np.sin, np.abs. They return a new array of the same shape.
What do reshape, flatten, and transpose do to a NumPy array?
reshape(m, n) returns the same data in a new $m \times n$ shape (a dimension of $-1$ is inferred automatically); flatten() returns a 1-D copy; transpose (a.T) swaps axes so $(a^{T})_{ij} = a_{ji}$, turning an $m \times n$ array into $n \times m$.
What is a pandas Series and how does it relate to a DataFrame?
A Series is a 1-D labeled array: values plus an index. A DataFrame is a 2-D table of rows and columns where each column is a Series sharing the same row index; df['col'] returns that column as a Series.
Which pandas methods give a quick first look at a DataFrame's contents, structure, and summary statistics?
df.head(n) / df.tail(n) show the first/last rows; df.info() shows column dtypes, non-null counts, and memory usage; df.describe() shows count, mean, std, min, quartiles ($25\%$, $50\%$, $75\%$), and max for numeric columns; df.shape gives (rows, columns).
How do you create a DataFrame from a Python dictionary, and what do the dict keys become?
pd.DataFrame({'name': [...], 'age': [...]}) — each key becomes a COLUMN name and each value list becomes that column's data; rows get a default integer index 0, 1, 2, ... unless index= is passed.
What do value_counts(), unique(), and nunique() return for a pandas Series?
value_counts(): the frequency of each distinct value, sorted descending (normalize=True gives proportions); unique(): an array of the distinct values; nunique(): the count of distinct values.
Which pandas methods detect and remove missing values, and which method fills them?
isnull()/isna() return a boolean mask of missing values (notnull() is the inverse); dropna() removes rows (or columns with axis=1) containing NaN; fillna(value) replaces NaN with a given value or statistic such as the column mean.
In pandas, what is the difference between apply(), map(), and replace() for transforming data?
Series.map() applies a function or dict lookup element-wise to one Series; apply() applies a function along a Series or DataFrame axis (rows/columns); replace() substitutes specific values with others (scalars, lists, or dicts) without needing a function.
Planning Data Analysis with Python for freeCodeCamp
Data Analysis with Python is about 10% of the freeCodeCamp syllabus by topic count — 14 of 145 topics, spread over 4 chapters. At roughly 45 minutes per topic plus 12 minutes per sub-topic, a first pass runs to about 10 hours.
The heaviest chapters are Certification Projects (5 topics), Pandas (4 topics), NumPy (3 topics) . Front-load those while your energy is high; the short chapters are better revision filler later.
Work top-down: read the chapter, then tick topics off individually rather than marking the whole chapter done. Sub-topics are where silent gaps hide.
Data Analysis with Python (freeCodeCamp) FAQ
What is in the freeCodeCamp Data Analysis with Python syllabus?
Data Analysis with Python is split into 4 chapters — NumPy, Pandas, Data Visualization and Certification Projects, containing 14 topics and 0 sub-topics in total.
How is Data Analysis with Python structured in the freeCodeCamp syllabus?
4 chapters. Data Analysis with Python accounts for about 10% of the topics in the whole freeCodeCamp syllabus (14 of 145).
How long should I spend on Data Analysis with Python for freeCodeCamp?
Budget around 10 hours for a first pass through Data Analysis with Python — about 45 minutes per topic plus 12 minutes per sub-topic across its 14 topics. Add revision cycles on top.
Are there flashcards for freeCodeCamp Data Analysis with Python?
Yes — a 50-card Data Analysis with Python deck. Sample cards are printed on this page, and the full deck is free in the Examius app with spaced repetition scheduling.