1. Home
  2. Explore
  3. Computer Science
  4. Python Data Analysis

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Python Data Analysis

  • 80Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Python Setup
The Python library commonly imported as pd for working with tabular data is
.

80 questions

  1. 1
    The Python library commonly imported as pd for working with tabular data is
    _____
    .
    Hint

    This library provides the DataFrame and Series structures.

    Answer

    pandas

  2. 2
    The numerical computing library imported as np is
    _____
    .
    Hint

    Its name combines 'numerical' with 'Python.'

    Answer

    numpy

  3. 3
    The plotting library imported using matplotlib.pyplot is assigned the alias
    _____
    .
    Hint

    This conventional alias consists of the library initials.

    Answer

    plt

  4. 4
    The visualization library imported as sns, especially useful for exploratory plots, is
    _____
    .
    Hint

    It is built on top of Matplotlib and provides higher-level statistical graphics.

    Answer

    seaborn

  5. 5
    A Kaggle notebook is similar to a
    _____
    notebook because both allow code execution alongside plain-text descriptions.
    Hint

    This environment is widely used for interactive Python work.

    Answer

    Jupyter

  6. 6
    The Matplotlib style sheet selected in the tutorial is
    _____
    .
    Hint

    It is selected with plt.style.use.

    Answer

    ggplot

  7. 7
    The pandas option used to control how many DataFrame columns are displayed is
    _____
    .
    Hint

    It is set through pd.set_option.

    Answer

    max_columns

  8. 8
    The variable conventionally used in the tutorial to represent the loaded DataFrame is
    _____
    .
    Hint

    The name is an abbreviation for 'data frame.'

    Answer

    df

  9. 9
    The pandas function used to load a CSV file into a DataFrame is
    _____
    .
    Hint

    It is called as a method of pandas.

    Answer

    read_csv

  10. 10
    The loaded roller-coaster dataset initially contains
    _____
    rows and 56 columns.
    Hint

    This is the row count reported by the DataFrame shape after loading.

    Answer

    1087

  11. 11
    The DataFrame attribute that returns the number of rows and columns is
    _____
    .
    Hint

    It is accessed as df.shape.

    Answer

    shape

  12. 12
    The DataFrame method that displays the first rows is
    _____
    .
    Hint

    It is called as df.head().

    Answer

    head

  13. 13
    When called without an argument, df.head() displays the first
    _____
    rows.
    Hint

    This is pandas' default preview size.

    Answer

    five

  14. 14
    To display the first 20 rows instead of the default preview, the number
    _____
    is passed to head.
    Hint

    The argument directly specifies how many rows to show.

    Answer

    20

  15. 15
    The DataFrame attribute used to list every column name is
    _____
    .
    Hint

    It is accessed as df.columns.

    Answer

    columns

  16. 16
    In pandas, each column of a DataFrame is represented as a
    _____
    .
    Hint

    It is pandas' one-dimensional labeled data structure.

    Answer

    Series

  17. 17
    The attribute used to inspect the data type of every DataFrame column is
    _____
    .
    Hint

    It is accessed as df.dtypes.

    Answer

    dtypes

  18. 18
    Columns containing text values are generally represented by the pandas data type
    _____
    .
    Hint

    This type appears frequently for string-like columns in the dataset.

    Answer

    object

  19. 19
    The DataFrame method that summarizes statistics for numeric columns is
    _____
    .
    Hint

    It is called as df.describe().

    Answer

    describe

  20. 20
    For the roller-coaster height column, the describe output reports a mean of approximately
    _____
    feet.
    Hint

    This is the average height stated in the tutorial.

    Answer

    101

  21. 21
    The first data-preparation rule emphasized in the tutorial is to remove unwanted columns or rows before
    _____
    the remaining data.
    Hint

    This avoids spending effort on data that will not be used.

    Answer

    cleaning

  22. 22
    Selecting only specified columns from a DataFrame is called
    _____
    the data.
    Hint

    It creates a smaller selection from the original data.

    Answer

    subsetting

  23. 23
    To select multiple DataFrame columns by name, pandas uses a list inside
    _____
    brackets.
    Hint

    The syntax looks like df[[...]].

    Answer

    two

  24. 24
    The drop method requires axis=1 when the goal is to remove a
    _____
    rather than a row.
    Hint

    In pandas, axis 1 refers to the horizontal dimension.

    Answer

    column

  25. 25
    The method added after selecting columns to ensure the result is a new independent DataFrame is
    _____
    .
    Hint

    It prevents the result from being merely a reference to the original object.

    Answer

    copy

  26. 26
    After the tutorial's initial column selection, the dataset contains
    _____
    columns.
    Hint

    The row count remains 1,087 at this stage.

    Answer

    13

  27. 27
    The pandas function used to convert a date-like column into a datetime type is
    _____
    .
    Hint

    It is called as pd.to_datetime.

    Answer

    to_datetime

  28. 28
    The pandas function used to force a string-like numeric column into a numeric type is
    _____
    .
    Hint

    It is called as pd.to_numeric.

    Answer

    to_numeric

  29. 29
    The DataFrame method used to change column names is
    _____
    .
    Hint

    It is called with a columns argument.

    Answer

    rename

  30. 30
    The mapping supplied to df.rename(columns=...) pairs each old column name with its
    _____
    column name.
    Hint

    The mapping tells pandas what each name should become.

    Answer

    new

  31. 31
    The tutorial recommends avoiding
    _____
    in column names because they make names harder to work with.
    Hint

    The preferred names do not contain blank characters.

    Answer

    spaces

  32. 32
    The command used to identify missing or null values element by element is
    _____
    .
    Hint

    It is applied to the DataFrame before counting nulls.

    Answer

    isna

  33. 33
    To count missing values for each column, the Boolean result of isna is followed by the method
    _____
    .
    Hint

    In pandas, True values contribute one when summed.

    Answer

    sum

  34. 34
    In the dataset, the status column has
    _____
    missing values.
    Hint

    This is the largest explicitly reported missing-value count.

    Answer

    213

  35. 35
    The two geographic columns reported as having missing values are latitude and
    _____
    .
    Hint

    Together they specify a location on Earth.

    Answer

    longitude

  36. 36
    The DataFrame method used to identify rows with duplicate values is
    _____
    .
    Hint

    It returns Boolean indicators for repeated rows.

    Answer

    duplicated

  37. 37
    By default, duplicated marks the second and later occurrences as duplicates while ignoring the
    _____
    occurrence.
    Hint

    The original occurrence is retained as the reference record.

    Answer

    first

  38. 38
    The DataFrame selection method used to retrieve rows identified by a Boolean duplicate mask is
    _____
    .
    Hint

    It performs label-based selection.

    Answer

    loc

  39. 39
    The subset argument of duplicated restricts duplicate detection to selected
    _____
    .
    Hint

    For example, the tutorial checks duplicated coaster names.

    Answer

    columns

  40. 40
    The tutorial finds
    _____
    rows with duplicated coaster names.
    Hint

    This count is obtained after applying duplicated to the coaster name column.

    Answer

    97

  41. 41
    The method used to filter the DataFrame by a string condition such as a particular coaster name is
    _____
    .
    Hint

    It accepts an expression describing the desired rows.

    Answer

    query

  42. 42
    To keep only the first occurrence of rows duplicated across selected columns, the tutorial applies the Boolean operator
    _____
    to the duplicate mask.
    Hint

    This operator reverses True and False values in the mask.

    Answer

    tilde

  43. 43
    The method used to renumber the index after removing duplicate rows is
    _____
    .
    Hint

    It restores a consecutive index sequence.

    Answer

    reset_index

  44. 44
    The argument drop=True prevents the old index from being retained as a new
    _____
    column.
    Hint

    Without this argument, the previous labels become data.

    Answer

    index

  45. 45
    After duplicate removal, the dataset contains
    _____
    unique roller coasters.
    Hint

    The final row count is reported after resetting the index.

    Answer

    990

  46. 46
    Analyzing one feature at a time, including its distribution and outliers, is called
    _____
    analysis.
    Hint

    The prefix 'uni' means one.

    Answer

    univariate

  47. 47
    The Series method that counts how frequently each unique value occurs is
    _____
    .
    Hint

    It is especially useful for categorical values or repeated years.

    Answer

    value_counts

  48. 48
    In the year-introduced column, the most common year in the example is
    _____
    .
    Hint

    The tutorial reports 46 roller coasters introduced in this year.

    Answer

    1999

  49. 49
    The number of roller coasters introduced in 1999 in the example is
    _____
    .
    Hint

    This is the highest count shown by value_counts.

    Answer

    46

  50. 50
    A plot that displays category counts with rectangular bars is a
    _____
    plot.
    Hint

    The tutorial uses it to show the top years of coaster introductions.

    Answer

    bar

  51. 51
    A plot that divides continuous values into bins and displays the count in each bin is a
    _____
    .
    Hint

    It is useful for examining the distribution of coaster speeds.

    Answer

    histogram

  52. 52
    The tutorial uses
    _____
    bins to make the roller-coaster speed histogram easier to interpret.
    Hint

    The number is passed through the bins argument.

    Answer

    20

  53. 53
    A kernel density estimate plot is abbreviated as a
    _____
    plot.
    Hint

    The abbreviation appears as the value of the plotting kind.

    Answer

    KDE

  54. 54
    Compared with a histogram, a KDE plot is generally less cluttered because it shows a smoothed
    _____
    of the distribution.
    Hint

    Its name includes the phrase 'density estimate.'

    Answer

    density

  55. 55
    A plot used to compare two numeric features by placing one observation at each coordinate pair is a
    _____
    plot.
    Hint

    The tutorial compares speed and height with this plot.

    Answer

    scatter

  56. 56
    In the speed-versus-height example, speed is placed on the
    _____
    axis.
    Hint

    The horizontal axis is conventionally represented by this letter.

    Answer

    x

  57. 57
    In the same example, height is placed on the
    _____
    axis.
    Hint

    The vertical axis is conventionally represented by this letter.

    Answer

    y

  58. 58
    The pandas plotting function that prevents a Matplotlib object from being printed unnecessarily is
    _____
    .
    Hint

    It is called through the plotting library.

    Answer

    show

  59. 59
    The Seaborn function used to create a scatter plot is
    _____
    .
    Hint

    It receives arguments such as x, y, and data.

    Answer

    scatterplot

  60. 60
    In a Seaborn scatter plot, the argument that assigns colors according to another variable is
    _____
    .
    Hint

    It produces different colored points for different categories or values.

    Answer

    hue

  61. 61
    The Seaborn function that compares several features pairwise in a matrix is
    _____
    .
    Hint

    It combines scatter plots and individual feature distributions.

    Answer

    pairplot

  62. 62
    In a pair plot, the diagonal usually displays the
    _____
    of each individual feature.
    Hint

    The off-diagonal cells show pairwise scatter plots.

    Answer

    distribution

  63. 63
    A pair plot organizes the pairwise feature comparisons in the form of a
    _____
    .
    Hint

    Rows and columns correspond to the selected features.

    Answer

    matrix

  64. 64
    The feature used as the color variable in the second pair-plot example is the type of
    _____
    used.
    Hint

    The categories include wood and steel.

    Answer

    material

  65. 65
    The pandas function used to calculate relationships among numeric columns is
    _____
    .
    Hint

    It returns a correlation DataFrame.

    Answer

    corr

  66. 66
    The reported correlation between coaster speed and height is approximately
    _____
    .
    Hint

    This positive value indicates a fairly strong relationship in the example.

    Answer

    0.73

  67. 67
    The Seaborn visualization used to display a correlation DataFrame with color intensity is a
    _____
    .
    Hint

    It represents larger or smaller values with different colors.

    Answer

    heat map

  68. 68
    The heat-map option that displays the numeric correlation values inside the colored cells is
    _____
    .
    Hint

    It is enabled with the annot setting.

    Answer

    annotations

  69. 69
    The diagonal of a correlation matrix contains
    _____
    because every feature is perfectly correlated with itself.
    Hint

    A perfect correlation is represented numerically by this value.

    Answer

    ones

  70. 70
    The final stage of exploratory data analysis is to ask a
    _____
    that the dataset can help answer.
    Hint

    The tutorial asks which locations have the fastest roller coasters.

    Answer

    question

  71. 71
    To exclude rows whose location is recorded as other, the tutorial filters with a condition stating that location does not
    _____
    other.
    Hint

    The condition uses an inequality comparison.

    Answer

    equal

  72. 72
    The pandas method used to divide the remaining rows into groups by location is
    _____
    .
    Hint

    It creates one group for each location.

    Answer

    groupby

  73. 73
    The aggregation method that calculates several summary statistics in one operation is
    _____
    .
    Hint

    It receives a dictionary of columns and functions.

    Answer

    agg

  74. 74
    The statistic used to calculate the average coaster speed within each location is the
    _____
    .
    Hint

    It is the arithmetic average.

    Answer

    mean

  75. 75
    The statistic used to count the number of roller coasters at each location is the
    _____
    .
    Hint

    It measures how many observations belong to each group.

    Answer

    count

  76. 76
    To keep only locations with at least 10 roller coasters, the count is filtered using the condition greater than or
    _____
    to 10.
    Hint

    The minimum is inclusive.

    Answer

    equal

  77. 77
    The DataFrame method used to order locations by their average speed is
    _____
    .
    Hint

    It sorts according to a specified column.

    Answer

    sort_values

  78. 78
    The final visualization of average coaster speed by location is a horizontal
    _____
    plot.
    Hint

    Locations are represented by bars extending along the speed axis.

    Answer

    bar

  79. 79
    The location with the highest average coaster speed in the example is
    _____
    .
    Hint

    It appears above Cedar Point in the sorted result.

    Answer

    Busch Gardens

  80. 80
    The location identified as having the second-highest average coaster speed is
    _____
    .
    Hint

    It follows Busch Gardens in the result.

    Answer

    Cedar Point

1 of 80
Question 1 of 80

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent