Skip to main content
`Ctrl`+`K`

# pandas.errors.EmptyDataError

exception pandas.errors.EmptyDataError

  Exception raised in `pd.read_csv` when empty data or header is encountered.

  This error is typically encountered when attempting to read an empty file or an invalid file where no data or headers are present.

  See also

  `read_csv`

    Read a comma-separated values (CSV) file into DataFrame.

  `errors.ParserError`

    Exception that is raised by an error encountered in parsing file contents.

  `errors.DtypeWarning`

    Warning raised when reading different dtypes in a column from a file.

  Examples

      >>> from io import StringIO
      >>> empty = StringIO()
      >>> pd.read_csv(empty)
      Traceback (most recent call last):
      EmptyDataError: No columns to parse from file