diff --git a/ci/code_checks.sh b/ci/code_checks.sh index f2d9f582d8932..a64f8b7bed66c 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -187,7 +187,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.errors.ClosedFileError SA01" \ -i "pandas.errors.DataError SA01" \ -i "pandas.errors.DuplicateLabelError SA01" \ - -i "pandas.errors.EmptyDataError SA01" \ -i "pandas.errors.IntCastingNaNError SA01" \ -i "pandas.errors.InvalidIndexError SA01" \ -i "pandas.errors.InvalidVersion SA01" \ diff --git a/pandas/errors/__init__.py b/pandas/errors/__init__.py index 7851bc90c5782..b9ceae341afd3 100644 --- a/pandas/errors/__init__.py +++ b/pandas/errors/__init__.py @@ -205,6 +205,17 @@ class EmptyDataError(ValueError): """ 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