Skip to content

Commit

Permalink
MAINT: Clean up docs in pandas/errors/__init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyoung authored and jowens committed Sep 20, 2017
1 parent 7364711 commit e5797fa
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions pandas/errors/__init__.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
# flake8: noqa

""" expose public exceptions & warnings """
"""
Expose public exceptions & warnings
"""

from pandas._libs.tslib import OutOfBoundsDatetime


class PerformanceWarning(Warning):
"""
Warnings shown when there is a possible performance
impact.
Warning raised when there is a possible
performance impact.
"""

class UnsupportedFunctionCall(ValueError):
"""
If attempting to call a numpy function on a pandas
object. For example using ``np.cumsum(groupby_object)``.
Exception raised when attempting to call a numpy function
on a pandas object, but that function is not supported by
the object e.g. ``np.cumsum(groupby_object)``.
"""

class UnsortedIndexError(KeyError):
"""
Error raised when attempting to get a slice of a MultiIndex
Error raised when attempting to get a slice of a MultiIndex,
and the index has not been lexsorted. Subclass of `KeyError`.
.. versionadded:: 0.20.0
Expand All @@ -29,22 +32,22 @@ class UnsortedIndexError(KeyError):

class ParserError(ValueError):
"""
Exception that is thrown by an error is encountered in `pd.read_csv`
Exception that is raised by an error encountered in `pd.read_csv`.
"""


class DtypeWarning(Warning):
"""
Warning that is raised for a dtype incompatiblity. This is
Warning that is raised for a dtype incompatiblity. This
can happen whenever `pd.read_csv` encounters non-
uniform dtypes in a column(s) of a given CSV file
uniform dtypes in a column(s) of a given CSV file.
"""


class EmptyDataError(ValueError):
"""
Exception that is thrown in `pd.read_csv` (by both the C and
Python engines) when empty data or header is encountered
Python engines) when empty data or header is encountered.
"""


Expand All @@ -53,13 +56,12 @@ class ParserWarning(Warning):
Warning that is raised in `pd.read_csv` whenever it is necessary
to change parsers (generally from 'c' to 'python') contrary to the
one specified by the user due to lack of support or functionality for
parsing particular attributes of a CSV file with the requsted engine
parsing particular attributes of a CSV file with the requsted engine.
"""


class MergeError(ValueError):
"""
Error raised when problems arise during merging due to problems
with input data. Subclass of `ValueError`.
"""

0 comments on commit e5797fa

Please sign in to comment.