Quiz: Pandas DataFrames and TCLab


1. What is the command to import a Comma Separate Value (CSV) file 'data.csv' in Pandas as a DataFrame?

A. pandas.import_csv('data.csv')
Incorrect.
B. pandas.read('data.csv')
Incorrect.
C. pandas.read_csv('data.csv')
Correct. See Pandas documentation for additional options.
D. pandas.csv('data.csv')
Incorrect.

2. What is the command to connect to the TCLab (USB serial connection to Arduino base) after import tclab? See TCLab Tutorial.

A. lab = tclab.TCLab()
Correct.
B. lab = TCLab()
Incorrect.
C. lab.close()
Incorrect. This is the command to disconnect.
D. lab.T1
Incorrect. This is the command to read temperature 1.

3. Which is NOT a valid TCLab command? See TCLab documentation.

A. lab.T1
Incorrect. Valid command: Read temperature 1.
B. lab.Q2(50)
Incorrect. Valid command: Turn on heater 2 to 50%.
C. lab.LED(25)
Incorrect. Valid command: Turn on LED to 25%.
D. lab.T2(25)
Correct. Not a valid command: Read temperature 2 with lab.T2 (no parenthesis).

💬