Skip to main content
`Ctrl`+`K`

# pandas.io.parsers.TextFileReader.close

TextFileReader.close()

  Close the underlying file handle and parser engine.

  Called automatically when the `TextFileReader` is used as a context manager.

  See also

  `TextFileReader.read`

    Read rows from the file into a DataFrame.

  `TextFileReader.get_chunk`

    Read the next chunk of rows.

  Examples

      >>> reader = pd.read_csv("data.csv", chunksize=5)
      >>> reader.close()