Free CompTIA DA0-002 Actual Exam Questions - Question 8 Discussion
[Data Acquisition and Preparation]
A data analyst needs to join together a table data source and a web API data source using Python. Which of the following is the best way to accomplish this task?
Makes sense to use JSON since APIs output it natively, so B.
It’s B for sure. APIs usually give you JSON directly, and pandas has built-in support to read JSON into DataFrames easily. Even if the database isn’t originally JSON, you can convert or export it without much hassle. Options like varchar, TXT, or just strings don’t naturally fit API responses or structured data merging. JSON keeps things clean and structured for merging in pandas.
A/C/D? JSON fits APIs best, but converting a database directly to JSON might be an extra step. Sometimes pulling the DB data straight into a DataFrame without format conversion is simpler.
Makes sense to go with B since JSON is the natural format for API data and pandas can easily parse it into DataFrames for merging. The other formats seem less straightforward. B
B makes the most sense since JSON is a common format for API data and pandas handles JSON well for merging.