DDMA Level IIIPython Data Visualisation
ChaptersAll cards (49)

DDMA Level III

Python Data Visualisation flashcards

Read the question, say the answer to yourself, then turn the card to check. The first 10 of 49 cards are free; the rest come with the subject.

Card 1 of 49

Jump to a card

Complete Flashcard Reference

Review every card in this deck. Open any card to reveal its answer. The first 10 are free; the other 39 come with the subject.

How does Python mark out a block of code, and what happens if the indentation is inconsistent?

Python uses indentation, not braces, to define blocks of code. An inconsistently indented block is a syntax error, not just a style problem.

When should you use the interactive interpreter, and when should you run a script?

Interactive interpreter: type and run one statement at a time, best for quick, one-off checks. Script from the command line: run a complete .py file, the standard way to run a finished, repeatable program.

What is the difference between a pandas Series and a DataFrame?

Series: a one-dimensional labelled array, like a single column. DataFrame: a two-dimensional labelled table, like a spreadsheet, and pandas' primary data structure.

How do merging, grouping and concatenating data differ?

Merging: combines two DataFrames based on a shared key column, like a SQL join. Concatenating: stacks DataFrames together, by row or by column. Grouping: splits one dataset into groups by a column's values, to summarise each group separately.

In a basic matplotlib line chart, what do plt.xlabel(), plt.ylabel(), label= and plt.legend() each do?

plt.xlabel() and plt.ylabel() set the axis titles. The string passed to label= (e.g. label='Sales') becomes the series' legend entry. plt.legend() displays that legend, and plt.show() draws the chart.

Which chart suits each question: a relationship, comparing distributions, a correlation matrix, change over time?

Relationship between two continuous variables: scatter plot. Comparing distributions across groups: box plot. Correlation matrix: heat map. Anything changing over time: time series chart.

What is a bubble chart?

A scatter plot where a third variable is encoded as the size of each point.

What is chart presentation style, and how can it be applied in matplotlib?

Consistent fonts, colours and layout across a set of charts. It can be applied with a matplotlib style sheet.

Using the statistics module, what do mean(), median() and mode() return for data = [2, 4, 4, 6, 9]?

stats.mean(data) returns 5 (25 / 5). stats.median(data) returns 4, the middle value. stats.mode(data) returns 4, the most frequent value.

What does a p-value indicate, and how is a small one read?

How likely the observed data would be if there were truly no effect. A small p-value, conventionally below 0.05, is evidence against that no-effect assumption.

What kind of language is Python, and why has it come to dominate data science work?

This answer comes with Python Data Visualisation. Buy the subject

What is the difference between a keyword and an identifier?

This answer comes with Python Data Visualisation. Buy the subject

What is the difference between a statement and a comment in Python?

This answer comes with Python Data Visualisation. Buy the subject

What does a variable hold, and which data types does the guide name?

This answer comes with Python Data Visualisation. Buy the subject

What is type conversion? Give the guide's example.

This answer comes with Python Data Visualisation. Buy the subject

What do input(), print() and import do?

This answer comes with Python Data Visualisation. Buy the subject

Which arithmetic operators and loops does the guide list?

This answer comes with Python Data Visualisation. Buy the subject

What is script mode programming?

This answer comes with Python Data Visualisation. Buy the subject

How can one Python statement continue over more than one line?

This answer comes with Python Data Visualisation. Buy the subject

What is PEP 8?

This answer comes with Python Data Visualisation. Buy the subject

What is a Python library?

This answer comes with Python Data Visualisation. Buy the subject

How do scrapy and BeautifulSoup differ as data acquisition libraries?

This answer comes with Python Data Visualisation. Buy the subject

What does installing Python involve?

This answer comes with Python Data Visualisation. Buy the subject

Why add Python's install location to the system PATH?

This answer comes with Python Data Visualisation. Buy the subject

What do PYTHONPATH and PYTHONHOME set?

This answer comes with Python Data Visualisation. Buy the subject

What do PYTHONSTARTUP and PYTHONCASEOK do?

This answer comes with Python Data Visualisation. Buy the subject

What is an integrated development environment (IDE)? Name examples from the guide.

This answer comes with Python Data Visualisation. Buy the subject

Which libraries does the SciPy stack bring in, and how is it typically installed?

This answer comes with Python Data Visualisation. Buy the subject

What is NumPy's ndarray?

This answer comes with Python Data Visualisation. Buy the subject

In what sense is NumPy a replacement for MATLAB?

This answer comes with Python Data Visualisation. Buy the subject

What are the key features of pandas?

This answer comes with Python Data Visualisation. Buy the subject

What is a pandas Panel, and what replaced it?

This answer comes with Python Data Visualisation. Buy the subject

How are SciPy's sub-packages organised? Give two examples.

This answer comes with Python Data Visualisation. Buy the subject

What is data cleansing, and why does it come before analysis?

This answer comes with Python Data Visualisation. Buy the subject

Which pandas functions read a CSV file and an Excel file into a DataFrame?

This answer comes with Python Data Visualisation. Buy the subject

What is data aggregation in Python?

This answer comes with Python Data Visualisation. Buy the subject

What must be done with unstructured data before it can be analysed like a clean DataFrame?

This answer comes with Python Data Visualisation. Buy the subject

What chart properties are added after a chart is created, and what does each do?

This answer comes with Python Data Visualisation. Buy the subject

What does a box plot show, and how is one drawn in matplotlib?

This answer comes with Python Data Visualisation. Buy the subject

What does a heat map show, and what is it useful for?

This answer comes with Python Data Visualisation. Buy the subject

What does a scatter plot show?

This answer comes with Python Data Visualisation. Buy the subject

Why are 3D charts used sparingly?

This answer comes with Python Data Visualisation. Buy the subject

What do a time series chart, a geographical chart and a graph (network) chart each show?

This answer comes with Python Data Visualisation. Buy the subject

How do statistics.stdev() and numpy.std() differ?

This answer comes with Python Data Visualisation. Buy the subject

What does skewness measure, and which function computes it?

This answer comes with Python Data Visualisation. Buy the subject

Which scipy.stats objects model the normal, binomial, Poisson and Bernoulli distributions, and what does each model?

This answer comes with Python Data Visualisation. Buy the subject

Which functions compute correlation, and what range does it take?

This answer comes with Python Data Visualisation. Buy the subject

What does the chi-square test check, and which scipy function runs it?

This answer comes with Python Data Visualisation. Buy the subject

How is a linear regression fitted with scipy, and what does it give for x = [1, 2, 3, 4, 5], y = [2, 4, 5, 4, 5]?

This answer comes with Python Data Visualisation. Buy the subject

How to revise with these cards

  • Answer out loud or on paper before you turn the card: recalling is what fixes it.
  • Go through the deck in short sessions of ten to fifteen minutes, every day.
  • Shuffle once you know the order, so you are not answering from memory of the sequence.
  • When a card catches you out, read the chapter it links to, then try the topic in a past paper.