Informatics Practices

Assertion. The read_csv() function reads a csv file's data into a DataFrame.

Reason. The to_csv() function writes a DataFrame on to a csv file.

  1. Both A and R are true and R is the correct explanation of A.
  2. Both A and R are true but R is not the correct explanation of A.
  3. A is true but R is false.
  4. A is false but R is true.

Python Pandas

1 Like

Answer

Both A and R are true but R is not the correct explanation of A.

Explanation
The read_csv() function in Pandas is used to read data from a CSV file into a DataFrame. Conversely, the to_csv() function is used to write DataFrame data to a CSV file.

Answered By

2 Likes


Related Questions