โ† All POC Flashcard Decks

Data Management & Integration Flashcards

7 cards from real POC practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 7 Data Management & Integration flashcards as text
  1. Which method in SQLAlchemy's ORM is used to add a new object to the session for insertion into the database?

    Answer: session.add(obj)

    session.add() stages a new ORM object for insertion; session.commit() then persists it to the database.

  2. What does the pandas 'groupby()' method return before an aggregation function is applied?

    Answer: A GroupBy object

    groupby() returns a DataFrameGroupBy or SeriesGroupBy object that holds groups and waits for an aggregation call like .sum() or .mean().

  3. Which Python standard library module is used to read and write JSON data?

    Answer: json

    The built-in json module provides json.loads(), json.dumps(), json.load(), and json.dump() for JSON serialization.

  4. In pandas, what is the result of performing an 'outer' merge when a key exists in only one DataFrame?

    Answer: NaN is inserted for missing values from the other DataFrame

    An outer merge keeps all rows from both DataFrames and fills missing counterpart values with NaN.

  5. Which method serializes a Python object to a JSON-formatted string?

    Answer: json.dumps()

    json.dumps() converts a Python object to a JSON string (the 's' suffix stands for 'string').

  6. What does the 'pivot_table()' function in pandas do?

    Answer: Creates a spreadsheet-style pivot table as a DataFrame

    pivot_table() aggregates data by one or more keys and produces a reshaped summary DataFrame, similar to Excel pivot tables.

  7. When using psycopg2 to connect to PostgreSQL, which parameter is NOT part of the standard connection string?

    Answer: charset

    psycopg2 uses host, dbname, user, password, and port; 'charset' is a MySQL/MariaDB connection concept, not PostgreSQL.