wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python to Access Data Quiz

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.
What does the open() function do in Python?
a)
Reads or writes a file
b)
Imports a module
c)
Declares a variable
d)
Runs a loop
2.
Which of the following are common file extensions for flat files?
a)
.csv
b)
.txt
c)
.doc
d)
.pdf
3.
Which library should you use in Python to read and write JSON files?
a)
pandas
b)
json
c)
requests
d)
openpyxl
4.
What type of object is created when loading a JSON file into Python?
a)
List
b)
Dictionary
c)
DataFrame
d)
Series
5.
What does the read_csv() function return in pandas?
a)
List
b)
Series
c)
DataFrame
d)
Dictionary
6.
Which formats can pandas handle directly for reading and writing?
a)
CSV
b)
Excel
c)
HTML
d)
TXT
7.
What does SQLAlchemy primarily help with?
a)
Web development
b)
Front-end styling
c)
Managing database connections
d)
Data visualization
8.
Which of the following are typical components in a SQLAlchemy connection string?
a)
Driver
b)
Username
c)
Password
d)
Chart type
9.
Which Python function loads SQL query results directly into a DataFrame?
a)
pd.read_sql()
b)
pd.to_sql()
c)
con.execute()
d)
pd.load_sql()
10.

Google Colab already has your (a)   for BigQuery.

11.
Which method is used to read data from BigQuery into a pandas DataFrame?
a)
pd.read_csv()
b)
pd.read_gbq()
c)
pd.read_bigquery()
d)
pd.query_bq()
12.
Which HTTP methods are commonly used when working with APIs?
a)
GET
b)
PUSH
c)
POST
d)
DELETE
13.
Which method converts an API response into a Python dictionary?
a)
json.loads()
b)
response.json()
c)
pd.read_json()
d)
str(response)
14.
What is the purpose of BeautifulSoup in web scraping?
a)
Downloading files
b)
Parsing HTML
c)
Managing servers
d)
Sending GET requests
15.
Which of the following are valid use cases for web scraping?
a)
Scraping job boards
b)
Extracting table formatting
c)
Collecting social media posts
d)
Copying CSS files