KnowledgeBoat Logo

Informatics Practices

While reading from a CSV file, to use a column's values as index labels, argument given in read_CSV() is :

  1. index
  2. index_col
  3. index_values
  4. index_label

Python Pandas

1 Like

Answer

index_col

Reason — The argument given in read_csv() to use a column's values as index labels is index_col. By specifying index_col with the name of the desired column, pandas will use the values from that column as the index labels for the DataFrame.

Answered By

1 Like


Related Questions