__________ implies that column names are inferred from the first line of the file while using Pandas read_csv() function.
__________ implies that column names are inferred from the first line of the file while using Pandas read_csv() function.
Solution
In pd.read_csv(), the header parameter gives the row number to use as column names. Row numbering starts at 0, so header=0 means the first line of the file becomes the column names.
This is also the default behaviour (header='infer') when no names argument is passed.
Option 3: header=1 takes the second line as column names and discards the first line.
Options 1 and 4: head is not a parameter of read_csv(). head() is a DataFrame method that shows the first few rows, and it is not related to column names.
Related questions:
2025: 3 June Shift 2
2025: 15 May Shift 2
2026: 26 May Shift 1
2026: 23 May Shift 1