Data Science Questions and Answers – Reading from Web and APIs – 1

This set of Data Science Multiple Choice Questions & Answers (MCQs) focuses on “Reading from Web and APIs – 1”.

1. Which of the following function is used for loading flat files?
a) read.data
b) read.sheet
c) read.table
d) none of the mentioned
View Answer

Answer: c
Explanation: This reads data in to the RAM.

2. Point out the correct statement.
a) XLConnect package has more options for manipulating access files
b) XLConnect vignette package can also be used for manipulating excel files
c) write.xlsx write out an excel file with different argument
d) None of the mentioned
View Answer

Answer: c
Explanation: write.xlsx write out an excel file with similar argument.

3. Which of the following is an important parameter of read.table function?
a) file
b) header
c) sep
d) all of the mentioned
View Answer

Answer: d
Explanation: More parameters are required for loading the data.

4. Which of the following will set the character that represents missing value?
a) na.quote
b) na.strings
c) nrows
d) all of the mentioned
View Answer

Answer: b
Explanation: na.strings takes a character vector.

advertisement
advertisement

5. Point out the wrong statement.
a) data.table inherits from data.frame
b) data.table is written in Java
c) data.table is faster at subsetting and updating data
d) none of the mentioned
View Answer

Answer: b
Explanation: data.table is written in C.

6. Which of the following package is used for reading excel data?
a) xlsx
b) xlsc
c) read.sheet
d) all of the mentioned
View Answer

Answer: a
Explanation: read.xlsx and read.xlsx functions are part of xlsx package.

7. Which of the following can be used to view all the tables in memory?
a) tables
b) alltable
c) table
d) none of the mentioned
View Answer

Answer: a
Explanation: The table function is a very basic, but essential, function to master while performing interactive data analyses.

8. Which of the following function programmatically extract parts of XML file?
a) XmlSApply
b) XmlApply
c) XmlSApplyData
d) All of the mentioned
View Answer

Answer: a
Explanation: xmlSApply are simple wrappers for tapply and lappy functions.

advertisement

9. Which of the following package is used for reading JSON data?
a) jsonlite
b) json
c) jsondata
d) all of the mentioned
View Answer

Answer: a
Explanation: The jsonlite package is a JSON generator optimized for the web.

10. Extracting XML is the basis for most web scraping.
a) True
b) False
View Answer

Answer: a
Explanation: XML is particularly used in web applications.

advertisement

Sanfoundry Global Education & Learning Series – Data Science.

Here’s the list of Best Books in Data Science.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.