Closed
Description
Code Sample, a copy-pastable example if possible
import pandas
d = pandas.DataFrame({"lat": [-6.081690, -5.207080], "lon": [145.789001, 145.391998]})
d.plot(kind='scatter', x='lat', y='lon')
Problem description
NameError Traceback (most recent call last)
<ipython-input-4-f42fef061f30> in <module>()
1 import pandas
2 d = pandas.DataFrame({"lat": [-6.081690, -5.207080], "lon": [145.789001, 145.391998]})
----> 3 d.plot(kind='scatter', x='lat', y='lon')
~/.local/lib/python3.6/site-packages/pandas/plotting/_core.py in __call__(self, x, y, kind, ax, subplots, sharex, sharey, layout, figsize, use_index, title, grid, legend, style, logx, logy, loglog, xticks, yticks, xlim, ylim, rot, fontsize, colormap, table, yerr, xerr, secondary_y, sort_columns, **kwds)
2675 fontsize=fontsize, colormap=colormap, table=table,
2676 yerr=yerr, xerr=xerr, secondary_y=secondary_y,
-> 2677 sort_columns=sort_columns, **kwds)
2678 __call__.__doc__ = plot_frame.__doc__
2679
~/.local/lib/python3.6/site-packages/pandas/plotting/_core.py in plot_frame(data, x, y, kind, ax, subplots, sharex, sharey, layout, figsize, use_index, title, grid, legend, style, logx, logy, loglog, xticks, yticks, xlim, ylim, rot, fontsize, colormap, table, yerr, xerr, secondary_y, sort_columns, **kwds)
1900 yerr=yerr, xerr=xerr,
1901 secondary_y=secondary_y, sort_columns=sort_columns,
-> 1902 **kwds)
1903
1904
~/.local/lib/python3.6/site-packages/pandas/plotting/_core.py in _plot(data, x, y, subplots, ax, kind, **kwds)
1685 if isinstance(data, DataFrame):
1686 plot_obj = klass(data, x=x, y=y, subplots=subplots, ax=ax,
-> 1687 kind=kind, **kwds)
1688 else:
1689 raise ValueError("plot kind %r can only be used for data frames"
~/.local/lib/python3.6/site-packages/pandas/plotting/_core.py in __init__(self, data, x, y, s, c, **kwargs)
835 # the handling of this argument later
836 s = 20
--> 837 super(ScatterPlot, self).__init__(data, x, y, s=s, **kwargs)
838 if is_integer(c) and not self.data.columns.holds_integer():
839 c = self.data.columns[c]
~/.local/lib/python3.6/site-packages/pandas/plotting/_core.py in __init__(self, data, x, y, **kwargs)
802
803 def __init__(self, data, x, y, **kwargs):
--> 804 MPLPlot.__init__(self, data, **kwargs)
805 if x is None or y is None:
806 raise ValueError(self._kind + ' requires and x and y column')
~/.local/lib/python3.6/site-packages/pandas/plotting/_core.py in __init__(self, data, kind, by, subplots, sharex, sharey, use_index, figsize, grid, legend, rot, ax, fig, title, xlim, ylim, xticks, yticks, sort_columns, fontsize, secondary_y, colormap, table, layout, **kwds)
98 table=False, layout=None, **kwds):
99
--> 100 _converter._WARN = False
101 self.data = data
102 self.by = by
NameError: name '_converter' is not defined
Output of pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.6.4.final.0
python-bits: 64
OS: Linux
OS-release: 4.14.0-3-amd64
machine: x86_64
processor:
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.22.0
pytest: None
pip: 9.0.1
setuptools: 38.5.1
Cython: None
numpy: 1.14.1
scipy: 0.19.1
pyarrow: None
xarray: None
IPython: 6.2.1
sphinx: 1.6.6
patsy: None
dateutil: 2.6.1
pytz: 2018.3
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: 0.999999999
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None