You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError Traceback (most recent call last)
<ipython-input-81-1ee08b4f09ca> in <module>
1 #q3.hint()
2 q3.solution()
----> 3 price_extremes = reviews.groupby('variety').price.agg([min, max])
/opt/conda/lib/python3.6/site-packages/pandas/core/groupby/generic.py in aggregate(self, func_or_funcs, *args, **kwargs)
849 # but not the class list / tuple itself.
850 func_or_funcs = _maybe_mangle_lambdas(func_or_funcs)
--> 851 ret = self._aggregate_multiple_funcs(func_or_funcs, (_level or 0) + 1)
852 if relabeling:
853 ret.columns = columns
/opt/conda/lib/python3.6/site-packages/pandas/core/groupby/generic.py in _aggregate_multiple_funcs(self, arg, _level)
916 for name, func in arg:
917 obj = self
--> 918 if name in results:
919 raise SpecificationError(
920 "Function names must be unique, found multiple named "
/opt/conda/lib/python3.6/site-packages/pandas/core/generic.py in __hash__(self)
1884 raise TypeError(
1885 "{0!r} objects are mutable, thus they cannot be"
-> 1886 " hashed".format(self.__class__.__name__)
1887 )
1888
TypeError: 'Series' objects are mutable, thus they cannot be hashed
Exercise: Grouping and Sorting - point 3
The text was updated successfully, but these errors were encountered:
price_extremes = reviews.groupby('variety').price.agg([min, max])
Exercise: Grouping and Sorting - point 3
The text was updated successfully, but these errors were encountered: