Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---------------------------------------------------------------------------
- AttributeError Traceback (most recent call last)
- //anaconda/lib/python2.7/site-packages/IPython/core/formatters.pyc in __call__(self, obj)
- 693 type_pprinters=self.type_printers,
- 694 deferred_pprinters=self.deferred_printers)
- --> 695 printer.pretty(obj)
- 696 printer.flush()
- 697 return stream.getvalue()
- //anaconda/lib/python2.7/site-packages/IPython/lib/pretty.pyc in pretty(self, obj)
- 399 if callable(meth):
- 400 return meth(obj, self, cycle)
- --> 401 return _default_pprint(obj, self, cycle)
- 402 finally:
- 403 self.end_group()
- //anaconda/lib/python2.7/site-packages/IPython/lib/pretty.pyc in _default_pprint(obj, p, cycle)
- 519 if _safe_getattr(klass, '__repr__', None) not in _baseclass_reprs:
- 520 # A user-provided repr. Find newlines and replace them with p.break_()
- --> 521 _repr_pprint(obj, p, cycle)
- 522 return
- 523 p.begin_group(1, '<')
- //anaconda/lib/python2.7/site-packages/IPython/lib/pretty.pyc in _repr_pprint(obj, p, cycle)
- 701 """A pprint that just redirects to the normal repr function."""
- 702 # Find newlines and replace them with p.break_()
- --> 703 output = repr(obj)
- 704 for idx,output_line in enumerate(output.splitlines()):
- 705 if idx:
- //anaconda/lib/python2.7/site-packages/pandas/core/base.pyc in __repr__(self)
- 63 Yields Bytestring in Py2, Unicode String in py3.
- 64 """
- ---> 65 return str(self)
- 66
- 67
- //anaconda/lib/python2.7/site-packages/pandas/core/base.pyc in __str__(self)
- 43 if compat.PY3:
- 44 return self.__unicode__()
- ---> 45 return self.__bytes__()
- 46
- 47 def __bytes__(self):
- //anaconda/lib/python2.7/site-packages/pandas/core/base.pyc in __bytes__(self)
- 55
- 56 encoding = get_option("display.encoding")
- ---> 57 return self.__unicode__().encode(encoding, 'replace')
- 58
- 59 def __repr__(self):
- //anaconda/lib/python2.7/site-packages/pandas/core/frame.pyc in __unicode__(self)
- 494 width = None
- 495 self.to_string(buf=buf, max_rows=max_rows, max_cols=max_cols,
- --> 496 line_width=width, show_dimensions=show_dimensions)
- 497
- 498 return buf.getvalue()
- //anaconda/lib/python2.7/site-packages/pandas/core/frame.pyc in to_string(self, buf, columns, col_space, colSpace, header, index, na_rep, formatters, float_format, sparsify, index_names, justify, line_width, max_rows, max_cols, show_dimensions)
- 1327 max_cols=max_cols,
- 1328 show_dimensions=show_dimensions)
- -> 1329 formatter.to_string()
- 1330
- 1331 if buf is None:
- //anaconda/lib/python2.7/site-packages/pandas/core/format.pyc in to_string(self)
- 482 text = info_line
- 483 else:
- --> 484 strcols = self._to_str_columns()
- 485 if self.line_width is None: # no need to wrap around just print the whole frame
- 486 text = adjoin(1, *strcols)
- //anaconda/lib/python2.7/site-packages/pandas/core/format.pyc in _to_str_columns(self)
- 410 *(_strlen(x) for x in cheader))
- 411
- --> 412 fmt_values = self._format_col(i)
- 413
- 414 fmt_values = _make_fixed_width(fmt_values, self.justify,
- //anaconda/lib/python2.7/site-packages/pandas/core/format.pyc in _format_col(self, i)
- 658 formatter = self._get_formatter(i)
- 659 return format_array(
- --> 660 (frame.iloc[:, i]).get_values(),
- 661 formatter, float_format=self.float_format, na_rep=self.na_rep,
- 662 space=self.col_space
- //anaconda/lib/python2.7/site-packages/pandas/sparse/series.pyc in get_values(self)
- 220 def get_values(self):
- 221 """ same as values """
- --> 222 return self._data._values.to_dense().view()
- 223
- 224 @property
- AttributeError: 'SingleBlockManager' object has no attribute 'to_dense'
- ---------------------------------------------------------------------------
- AttributeError Traceback (most recent call last)
- //anaconda/lib/python2.7/site-packages/IPython/core/formatters.pyc in __call__(self, obj)
- 337 method = _safe_get_formatter_method(obj, self.print_method)
- 338 if method is not None:
- --> 339 return method()
- 340 return None
- 341 else:
- //anaconda/lib/python2.7/site-packages/pandas/core/frame.pyc in _repr_html_(self)
- 529 'max-width:1500px;overflow:auto;">\n' +
- 530 self.to_html(max_rows=max_rows, max_cols=max_cols,
- --> 531 show_dimensions=show_dimensions) + '\n</div>')
- 532 else:
- 533 return None
- //anaconda/lib/python2.7/site-packages/pandas/core/frame.pyc in to_html(self, buf, columns, col_space, colSpace, header, index, na_rep, formatters, float_format, sparsify, index_names, justify, bold_rows, classes, escape, max_rows, max_cols, show_dimensions)
- 1377 max_cols=max_cols,
- 1378 show_dimensions=show_dimensions)
- -> 1379 formatter.to_html(classes=classes)
- 1380
- 1381 if buf is None:
- //anaconda/lib/python2.7/site-packages/pandas/core/format.pyc in to_html(self, classes)
- 671 max_cols=self.max_cols)
- 672 if hasattr(self.buf, 'write'):
- --> 673 html_renderer.write_result(self.buf)
- 674 elif isinstance(self.buf, compat.string_types):
- 675 with open(self.buf, 'w') as f:
- //anaconda/lib/python2.7/site-packages/pandas/core/format.pyc in write_result(self, buf)
- 863 indent += self.indent_delta
- 864 indent = self._write_header(indent)
- --> 865 indent = self._write_body(indent)
- 866
- 867 self.write('</table>', indent)
- //anaconda/lib/python2.7/site-packages/pandas/core/format.pyc in _write_body(self, indent)
- 1007 fmt_values = {}
- 1008 for i in range(min(len(self.columns), self.max_cols)):
- -> 1009 fmt_values[i] = self.fmt._format_col(i)
- 1010
- 1011 # write values
- //anaconda/lib/python2.7/site-packages/pandas/core/format.pyc in _format_col(self, i)
- 658 formatter = self._get_formatter(i)
- 659 return format_array(
- --> 660 (frame.iloc[:, i]).get_values(),
- 661 formatter, float_format=self.float_format, na_rep=self.na_rep,
- 662 space=self.col_space
- //anaconda/lib/python2.7/site-packages/pandas/sparse/series.pyc in get_values(self)
- 220 def get_values(self):
- 221 """ same as values """
- --> 222 return self._data._values.to_dense().view()
- 223
- 224 @property
- AttributeError: 'SingleBlockManager' object has no attribute 'to_dense'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement