We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This a minor enhancement proposal. At the moment I cannot submit a pull request. I will probably have time to create one during the next week.
This is a snippet from tools/plotting.py: https://github.com/pydata/pandas/blob/master/pandas/tools/plotting.py#L2269-2283
tools/plotting.py
def _plot(data, x=None, y=None, subplots=False, ax=None, kind='line', **kwds): kind = _get_standard_kind(kind.lower().strip()) if kind in _all_kinds: klass = _plot_klass[kind] else: raise ValueError('Invalid chart type given %s' % kind) from pandas import DataFrame if kind in _dataframe_kinds: if isinstance(data, DataFrame): plot_obj = klass(data, x=x, y=y, subplots=subplots, ax=ax, kind=kind, **kwds) else: raise ValueError('Invalid chart type given %s' % kind)
Which results in following error message:
C:\Anaconda3\lib\site-packages\pandas\tools\plotting.py in plot_series(series, label, kind, use_index, rot, xticks, yticks, xlim, ylim, ax, style, grid, legend, logx, logy, secondary_y, **kwds) 2231 klass = _plot_klass[kind] 2232 else: -> 2233 raise ValueError('Invalid chart type given %s' % kind) 2234 2235 """ ValueError: Invalid chart type given hist
I would suggest using the format string "Invalid chart type given: '%s'" instead.
"Invalid chart type given: '%s'"
The text was updated successfully, but these errors were encountered:
I think that is certainly a good proposal. Do a PR when you like!
Sorry, something went wrong.
PR: #9417
Successfully merging a pull request may close this issue.
This a minor enhancement proposal. At the moment I cannot submit a pull request. I will probably have time to create one during the next week.
This is a snippet from
tools/plotting.py
: https://github.com/pydata/pandas/blob/master/pandas/tools/plotting.py#L2269-2283Which results in following error message:
I would suggest using the format string
"Invalid chart type given: '%s'"
instead.The text was updated successfully, but these errors were encountered: