1
1
# flake8: noqa
2
2
3
- """ expose public exceptions & warnings """
3
+ """
4
+ Expose public exceptions & warnings
5
+ """
4
6
5
7
from pandas ._libs .tslib import OutOfBoundsDatetime
6
8
7
9
8
10
class PerformanceWarning (Warning ):
9
11
"""
10
- Warnings shown when there is a possible performance
11
- impact.
12
+ Warning raised when there is a possible
13
+ performance impact.
12
14
"""
13
15
14
16
class UnsupportedFunctionCall (ValueError ):
15
17
"""
16
- If attempting to call a numpy function on a pandas
17
- object. For example using ``np.cumsum(groupby_object)``.
18
+ Exception raised when attempting to call a numpy function
19
+ on a pandas object, but that function is not supported by
20
+ the object e.g. ``np.cumsum(groupby_object)``.
18
21
"""
19
22
20
23
class UnsortedIndexError (KeyError ):
21
24
"""
22
- Error raised when attempting to get a slice of a MultiIndex
25
+ Error raised when attempting to get a slice of a MultiIndex,
23
26
and the index has not been lexsorted. Subclass of `KeyError`.
24
27
25
28
.. versionadded:: 0.20.0
@@ -29,22 +32,22 @@ class UnsortedIndexError(KeyError):
29
32
30
33
class ParserError (ValueError ):
31
34
"""
32
- Exception that is thrown by an error is encountered in `pd.read_csv`
35
+ Exception that is raised by an error encountered in `pd.read_csv`.
33
36
"""
34
37
35
38
36
39
class DtypeWarning (Warning ):
37
40
"""
38
- Warning that is raised for a dtype incompatiblity. This is
41
+ Warning that is raised for a dtype incompatiblity. This
39
42
can happen whenever `pd.read_csv` encounters non-
40
- uniform dtypes in a column(s) of a given CSV file
43
+ uniform dtypes in a column(s) of a given CSV file.
41
44
"""
42
45
43
46
44
47
class EmptyDataError (ValueError ):
45
48
"""
46
49
Exception that is thrown in `pd.read_csv` (by both the C and
47
- Python engines) when empty data or header is encountered
50
+ Python engines) when empty data or header is encountered.
48
51
"""
49
52
50
53
@@ -53,13 +56,12 @@ class ParserWarning(Warning):
53
56
Warning that is raised in `pd.read_csv` whenever it is necessary
54
57
to change parsers (generally from 'c' to 'python') contrary to the
55
58
one specified by the user due to lack of support or functionality for
56
- parsing particular attributes of a CSV file with the requsted engine
59
+ parsing particular attributes of a CSV file with the requsted engine.
57
60
"""
58
61
59
62
60
63
class MergeError (ValueError ):
61
64
"""
62
65
Error raised when problems arise during merging due to problems
63
66
with input data. Subclass of `ValueError`.
64
-
65
67
"""
0 commit comments