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
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
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
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
Explanation: na.strings takes a character vector.
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
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
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
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
Explanation: xmlSApply are simple wrappers for tapply and lappy functions.
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
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
Explanation: XML is particularly used in web applications.
Sanfoundry Global Education & Learning Series – Data Science.
Here’s the list of Best Books in Data Science.
- Practice Programming MCQs
- Apply for Computer Science Internship
- Check Computer Science Books
- Check Data Science Books
- Check Programming Books