Skip to content

Commit

Permalink
DOC: Rewriting of ParserError doc + minor spacing (pandas-dev#25421)
Browse files Browse the repository at this point in the history
Follow-up to pandas-devgh-25414.
  • Loading branch information
gfyoung authored and Pingviinituutti committed Feb 28, 2019
1 parent 7042d06 commit 233ca55
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions pandas/errors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,18 @@

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


class UnsupportedFunctionCall(ValueError):
"""
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,
Expand All @@ -31,9 +32,15 @@ class UnsortedIndexError(KeyError):

class ParserError(ValueError):
"""
Exception that is raised by an error encountered in `pd.read_csv`.
Exception that is raised by an error encountered in parsing file contents.
This is a generic error raised for errors encountered when functions like
`read_csv` or `read_html` are parsing contents of a file.
e.g. HTML Parsing will raise this error.
See Also
--------
read_csv : Read CSV (comma-separated) file into a DataFrame.
read_html : Read HTML table into a DataFrame.
"""


Expand Down Expand Up @@ -182,4 +189,4 @@ def __str__(self):
else:
name = self.class_instance.__class__.__name__
msg = "This {methodtype} must be defined in the concrete class {name}"
return (msg.format(methodtype=self.methodtype, name=name))
return msg.format(methodtype=self.methodtype, name=name)

0 comments on commit 233ca55

Please sign in to comment.