Flashcards · Pandas · Free
Pandas flashcards, generated for you.
Example Pandas study cards to learn from right now — then generate a full set from your own notes (plus a practice quiz) and export to Quizlet or Anki. Free, no account needed.
Example Pandas flashcards
What is a Pandas Series and how does it differ from a DataFrame?
A Series is a 1D labeled array with index and values (like a column). A DataFrame is a 2D labeled table with multiple Series as columns, indexed by rows and columns.
How do you select a single column from a DataFrame and what type is returned?
Use df['column_name'] or df.column_name. Returns a Series object (1D). Use df[['column_name']] with double brackets to return a DataFrame (2D).
What is the difference between .loc[] and .iloc[] for indexing?
.loc[] uses label-based indexing (row/column names or boolean masks). .iloc[] uses integer position-based indexing (0, 1, 2...). Both support row and column selection.
Explain the concept of Boolean indexing in Pandas and give an example use case.
Boolean indexing filters rows using a condition that returns True/False values. Example: df[df['age'] > 30] returns rows where age exceeds 30. Useful for data filtering and subsetting.
What does .groupby() do and what is the general workflow?
.groupby() splits data into groups by one or more columns, applies an aggregation function, and recombines results. Workflow: groupby → aggregate (sum, mean, count, etc.) → result as new DataFrame.
How do .merge() and .join() differ in combining DataFrames?
.merge() joins on specified columns (SQL-like, flexible); .join() joins on indices by default. .merge() is more explicit for column-based joins; .join() is simpler for index-based joins.
What is a MultiIndex and when would you use it in analysis?
A MultiIndex has multiple levels of row or column labels, enabling hierarchical indexing. Use it for organizing complex data (e.g., time-series by region and product) and enabling advanced slicing and grouping operations.
Explain .apply() and how it differs from .map() in Pandas.
.apply() applies a function element-wise or row/column-wise to Series/DataFrame. .map() is Series-only, applies a function element-wise or uses a dict for value mapping. Use .apply() for row operations; .map() for simple value replacements.
What does .pivot_table() do and how is it useful in data analysis?
.pivot_table() reshapes data by specifying index, columns, and values, with automatic aggregation (default: mean). Useful for summarizing data by multiple dimensions, creating cross-tabulations, and exploratory analysis.
How do you handle missing data in Pandas and what are the trade-offs between methods?
.fillna() replaces NaNs with a value, forward-fill (.ffill()), or backward-fill (.bfill()). .dropna() removes rows/columns with NaNs. Fillna preserves rows; dropna loses data. Choose based on analysis intent and data importance.
Make your own Pandas study set
Flashcards for related topics
Studying Pandas to build with AI? MindloomHQ turns it into real skills — structured courses, agent projects, and certificates.
Explore MindloomHQ →