pandas.errors.EmptyDataError#
- exception pandas.errors.EmptyDataError[source]#
Exception raised in
pd.read_csvwhen 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_csvRead a comma-separated values (CSV) file into DataFrame.
errors.ParserErrorException that is raised by an error encountered in parsing file contents.
errors.DtypeWarningWarning 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