🌍 Python Programming · flashcards
Python Programming Data Analysis And Scientific Libraries Flashcards
50 question-and-answer cards covering Data Analysis And Scientific Libraries as it is examined in Python Programming. 24 of them are printed below, taken from across the deck — no signup, no paywall on the preview.
24 sample cards from the Data Analysis And Scientific Libraries deck
Sampled from the end of the deck, so these are different cards from the ones shown on the syllabus page.
What do df.head() and df.info() show?
df.head() shows the first 5 rows (n configurable); df.info() shows column names, non-null counts, dtypes, and memory usage.
What does df.describe() return?
Summary statistics for numeric columns: count, mean, std, min, the 25/50/75 percentiles, and max.
How are missing values represented in Pandas, and how do you detect them?
As NaN (or pd.NA / NaT); detect with df.isna() / df.isnull(), often summed via df.isna().sum() for counts per column.
What is the difference between dropna() and fillna() in Pandas?
dropna() removes rows/columns containing missing values; fillna(value) replaces missing values with a specified value or strategy (e.g. mean, forward-fill).
What do the fillna methods ffill and bfill do?
ffill (forward fill) propagates the last valid value forward; bfill (backward fill) propagates the next valid value backward to fill NaNs.
How do you remove duplicate rows in a DataFrame, and how do you find them?
df.drop_duplicates() removes duplicate rows; df.duplicated() returns a boolean Series marking duplicates.
How do you rename columns and change a column's data type in Pandas?
Rename with df.rename(columns={'old':'new'}); change dtype with df['col'] = df['col'].astype(new_type) or pd.to_numeric/pd.to_datetime.
What does the Pandas .apply() method do?
It applies a function along an axis of a DataFrame or to each element of a Series, enabling custom row/column/element-wise transformations.
What is the difference between map, apply, and applymap in Pandas?
Series.map applies element-wise to a Series; DataFrame.apply applies a function along rows or columns; DataFrame.applymap (now .map) applies element-wise to every cell of a DataFrame.
What does the Pandas groupby operation follow as its conceptual model?
The split-apply-combine model: split data into groups by key(s), apply a function (e.g. aggregation) to each group, then combine the results into a new structure.
Give three common aggregation functions used with Pandas groupby.
sum(), mean(), and count() (others include min, max, median, std, and .agg() for multiple/custom aggregations).
How does .agg() extend groupby aggregation?
It lets you apply multiple aggregation functions at once and/or different functions per column, e.g. df.groupby('k').agg({'a':'sum','b':['mean','max']}).
What is the difference between pd.merge and pd.concat?
pd.merge joins DataFrames on key columns/indexes using database-style joins; pd.concat stacks DataFrames along an axis (rows or columns) without key matching.
Name the four join types available in pd.merge via the how parameter.
inner (intersection of keys), outer (union of keys), left (all left keys), and right (all right keys).
What does a Pandas pivot_table do?
It reshapes data into a spreadsheet-style table, aggregating values (via aggfunc) over specified index rows and columns, e.g. summarizing sales by region (rows) and month (columns).
In Matplotlib, what is the difference between a Figure and an Axes?
A Figure is the overall container/canvas for the whole drawing; an Axes is an individual plot (with its own x/y axes, title, and data) placed inside the Figure.
What does plt.subplots(nrows, ncols) return?
A tuple (fig, ax): the Figure object and an Axes object (or an array of Axes) arranged in the specified grid.
Which Matplotlib functions create a line plot, a scatter plot, and a bar chart?
plt.plot (or ax.plot) for line plots, plt.scatter for scatter plots, and plt.bar (or plt.barh) for bar charts.
Which Matplotlib functions add a title and axis labels to a plot?
plt.title (or ax.set_title), plt.xlabel/plt.ylabel (or ax.set_xlabel/ax.set_ylabel).
What does a Matplotlib histogram (plt.hist) display, and what does the bins parameter control?
It displays the frequency distribution of a single numeric variable by grouping values into intervals; bins controls the number/edges of those intervals.
What is Seaborn and how does it relate to Matplotlib?
Seaborn is a high-level statistical data visualization library built on top of Matplotlib, providing attractive default styles and concise functions for common statistical plots, with tight Pandas integration.
In Seaborn, what is the difference between a box plot and a violin plot?
A box plot shows the five-number summary (median, quartiles, whiskers) and outliers; a violin plot shows that plus the full kernel density estimate of the distribution's shape.
What does a heatmap (e.g. sns.heatmap) visualize, and a common use case?
It encodes a matrix of values as colors; a common use is displaying a correlation matrix (df.corr()) to see relationships between variables at a glance.
When interpreting a scatter plot, what does a tight upward-sloping band of points indicate?
A strong positive linear correlation between the two variables; a tight downward slope indicates strong negative correlation, and a shapeless cloud indicates little/no linear correlation.
What this deck covers
This deck covers the Data Analysis And Scientific Libraries portion of the Python Programming syllabus in question-and-answer form. Browse the full Python Programming syllabus to see how it fits with the rest.
Answers are written to be recallable, not just readable — averaging about 142 characters, which is long enough to carry the reasoning and short enough to say out loud.
A deck like this earns its keep on the second and third pass. Read the syllabus first so you know the shape of the subject, then use the cards to find the specific facts that have not stuck.
Data Analysis And Scientific Libraries flashcards FAQ
How many Data Analysis And Scientific Libraries flashcards are in this Python Programming deck?
50 cards. This page previews 24 of them, sampled evenly across the deck so you can judge the difficulty before installing anything.
Are these Python Programming flashcards free?
Yes. The preview here is free to read with no signup, and the full 50-card deck is free inside the Examius app.
What do the Data Analysis And Scientific Libraries cards cover?
They follow the Data Analysis And Scientific Libraries portion of the Python Programming syllabus, in question-and-answer form.
How should I use these flashcards?
Read the syllabus first so you know the shape of the subject, then drill the deck. Examius schedules each card with spaced repetition, so cards you keep missing come back sooner and ones you know drift further apart.