Data Collection & Ingestion — Quiz

Answer all 12 questions, then submit. You need 70% to pass. Log in to save progress.

Question 1
Which Pandas function loads a comma-separated file into a DataFrame?
A pd.open_csv()
B pd.read_csv()
C pd.load()
D pd.csv()
Question 2
You want only three columns and dates read as real dates. Which options help?
A usecols and parse_dates
B skip and fast
C columns and dateformat
D only and asdate
Question 3
Which connection URL is for a local SQLite database?
A mysql+pymysql://...
B postgresql+psycopg2://...
C sqlite:///company.db
D oracle://...
Question 4
How should database passwords be supplied to your script?
A Typed directly in the code
B From environment variables
C In a public GitHub file
D In the SQL query
Question 5
Which two libraries are the classic pair for web scraping?
A NumPy and SciPy
B Requests and BeautifulSoup
C Flask and Django
D Matplotlib and Seaborn
Question 6
Before scraping a website you should FIRST…
A Download as fast as possible
B Check its robots.txt and Terms of Service
C Collect users' personal data
D Ignore the API even if one exists
Question 7
An API call succeeded. What HTTP status code do you expect?
A 404
B 500
C 200
D 302
Question 8
What does resp.json() do?
A Saves the response to disk
B Converts the JSON response into a Python dict/list
C Sends a new request
D Validates your API key
Question 9
Which Pandas function flattens nested JSON into a table?
A pd.flatten()
B pd.json_normalize()
C pd.read_json_nested()
D pd.unnest()
Question 10
An OAuth token is usually sent in which HTTP header?
A Content-Type
B Authorization: Bearer ...
C User-Agent
D Accept
Question 11
Why save each API pull to a timestamped file and never edit it?
A To use more disk space
B To keep raw data immutable so any analysis is reproducible
C Because Pandas requires it
D To hide the data
Question 12
What is the safest way to make an API call fail loudly on an error?
A Ignore the status code
B Call resp.raise_for_status()
C Wrap everything in a bare except:
D Retry forever