Complete the code to read a CSV file named 'data.csv' using pandas.
import pandas as pd df = pd.read_csv('data.csv', [1])
The sep parameter specifies the delimiter used in the CSV file. The correct parameter name is sep.
Complete the code to read a CSV file without a header row.
import pandas as pd df = pd.read_csv('data.csv', header=[1])
Setting header=None tells pandas that the CSV file has no header row, so it will assign default column names.
Fix the error in the code to read a CSV file with UTF-8 encoding.
import pandas as pd df = pd.read_csv('data.csv', encoding=[1])
The correct encoding string for UTF-8 in pandas is 'utf-8' with a hyphen.
Fill both blanks to read a CSV file with semicolon separator and no header.
import pandas as pd df = pd.read_csv('data.csv', sep=[1], header=[2])
Use sep=';' to specify semicolon separator and header=None to indicate no header row.
Fill all three blanks to read a CSV file with tab separator, no header, and UTF-8 encoding.
import pandas as pd df = pd.read_csv('data.csv', sep=[1], header=[2], encoding=[3])
Use sep='\t' for tab separator, header=None for no header, and encoding='utf-8' for UTF-8 encoding.