EDIT: The error mysteriously disappeared today after I open the notebook again, not sure why.
Hi,
I am working on lesson3-planet notebook. I am trying to load the dataset from kaggle using:
df = pd.read_csv(path/'train_v2.csv')
df.head()
I got the following error:
TypeError Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/IPython/core/formatters.py in __call__(self, obj)
697 type_pprinters=self.type_printers,
698 deferred_pprinters=self.deferred_printers)
--> 699 printer.pretty(obj)
700 printer.flush()
701 return stream.getvalue()
/usr/local/lib/python3.6/dist-packages/IPython/lib/pretty.py in pretty(self, obj)
396 if callable(meth):
397 return meth(obj, self, cycle)
--> 398 return _default_pprint(obj, self, cycle)
399 finally:
400 self.end_group()
/usr/local/lib/python3.6/dist-packages/IPython/lib/pretty.py in _default_pprint(obj, p, cycle)
516 if _safe_getattr(klass, '__repr__', None) not in _baseclass_reprs:
517 # A user-provided repr. Find newlines and replace them with p.break_()
--> 518 _repr_pprint(obj, p, cycle)
519 return
520 p.begin_group(1, '<')
/usr/local/lib/python3.6/dist-packages/IPython/lib/pretty.py in _repr_pprint(obj, p, cycle)
707 """A pprint that just redirects to the normal repr function."""
708 # Find newlines and replace them with p.break_()
--> 709 output = repr(obj)
710 for idx,output_line in enumerate(output.splitlines()):
711 if idx:
/usr/local/lib/python3.6/dist-packages/pandas/core/base.py in __repr__(self)
78 Yields Bytestring in Py2, Unicode String in py3.
79 """
---> 80 return str(self)
81
82
/usr/local/lib/python3.6/dist-packages/pandas/core/base.py in __str__(self)
57
58 if compat.PY3:
---> 59 return self.__unicode__()
60 return self.__bytes__()
61
/usr/local/lib/python3.6/dist-packages/pandas/core/frame.py in __unicode__(self)
634 width = None
635 self.to_string(buf=buf, max_rows=max_rows, max_cols=max_cols,
--> 636 line_width=width, show_dimensions=show_dimensions)
637
638 return buf.getvalue()
/usr/local/lib/python3.6/dist-packages/pandas/core/frame.py in to_string(self, buf, columns, col_space, header, index, na_rep, formatters, float_format, sparsify, index_names, justify, line_width, max_rows, max_cols, show_dimensions)
1673 max_cols=max_cols,
1674 show_dimensions=show_dimensions)
-> 1675 formatter.to_string()
1676
1677 if buf is None:
/usr/local/lib/python3.6/dist-packages/pandas/io/formats/format.py in to_string(self)
601 elif (not isinstance(self.max_cols, int) or
602 self.max_cols > 0): # need to wrap around
--> 603 text = self._join_multiline(*strcols)
604 else: # max_cols == 0. Try to fit frame to terminal
605 text = self.adj.adjoin(1, *strcols).split('\n')
/usr/local/lib/python3.6/dist-packages/pandas/io/formats/format.py in _join_multiline(self, *strcols)
648 idx = strcols.pop(0)
649 lwidth -= np.array([self.adj.len(x)
--> 650 for x in idx]).max() + adjoin_width
651
652 col_widths = [np.array([self.adj.len(x) for x in col]).max() if
/usr/local/lib/python3.6/dist-packages/numpy/core/_methods.py in _amax(a, axis, out, keepdims, initial)
26 def _amax(a, axis=None, out=None, keepdims=False,
27 initial=_NoValue):
---> 28 return umr_maximum(a, axis, None, out, keepdims, initial)
29
30 def _amin(a, axis=None, out=None, keepdims=False,
TypeError: reduce() takes at most 5 arguments (6 given)
Apparently, it comes from trying to display the data frame. Any suggestion here?