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
Which pandas method is used to merge two DataFrames on a common column, similar to a SQL JOIN?
Answer: merge()
pd.merge() combines DataFrames based on one or more shared key columns, mirroring SQL JOIN behavior.
When reading a CSV file with pandas, which parameter specifies a custom delimiter instead of a comma?
Answer: sep
The 'sep' parameter in pd.read_csv() defines the character used to separate fields in the file.
Which Python library provides the 'connect()' function used to establish a connection to a SQLite database?
Answer: sqlite3
The built-in sqlite3 module's connect() function creates or opens a SQLite database file.
What does the pandas 'fillna()' method do?
Answer: Replaces NaN values with a specified value
fillna() replaces missing (NaN) values in a DataFrame or Series with a given scalar, dict, or method.
In Python's sqlite3 module, what object is used to execute SQL statements?
Answer: Cursor
A Cursor object obtained via connection.cursor() is used to execute SQL commands and fetch results.
Which pandas method converts a DataFrame column containing string dates into datetime objects?
Answer: pd.to_datetime(df['col'])
pd.to_datetime() parses string or numeric representations of dates into pandas Timestamp objects.
What is the purpose of the 'chunksize' parameter in pd.read_csv()?
Answer: Returns an iterator that reads the file in chunks of rows
chunksize causes read_csv() to return a TextFileReader iterator, yielding DataFrames of the specified row count for memory-efficient processing.