Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- duration start_date start_year start_month start_hour weekday start_city end_city subscription_type
- 0 1.050000 2013-08-29 2013 8 14 3 San Francisco San Francisco Subscriber
- 1 1.166667 2013-08-29 2013 8 14 3 San Jose San Jose Subscriber
- 2 1.183333 2013-08-29 2013 8 10 3 Mountain View Mountain View Subscriber
- 3 1.283333 2013-08-29 2013 8 11 3 San Jose San Jose Subscriber
- 4 1.383333 2013-08-29 2013 8 12 3 San Francisco San Francisco Subscriber
- viagem_por_tipo = trip_data.groupby(['subscription_type'],['weekday'])['start_year'].count()
- viagem_por_tipo.plot.bar()
- TypeError Traceback (most recent call last)
- <ipython-input-40-4b3318e38ba7> in <module>()
- ----> 1 viagem_por_tipo = trip_data.groupby(['subscription_type'],['weekday'])['start_year'].count()
- 2 viagem_por_tipo.plot.bar()
- C:UsersMichel SpieroAnaconda3libsite-packagespandascoregeneric.py in groupby(self, by, axis, level, as_index, sort, group_keys, squeeze, **kwargs)
- 4266 if level is None and by is None:
- 4267 raise TypeError("You have to supply one of 'by' and 'level'")
- -> 4268 axis = self._get_axis_number(axis)
- 4269 return groupby(self, by=by, axis=axis, level=level, as_index=as_index,
- 4270 sort=sort, group_keys=group_keys, squeeze=squeeze,
- C:UsersMichel SpieroAnaconda3libsite-packagespandascoregeneric.py in _get_axis_number(self, axis)
- 339
- 340 def _get_axis_number(self, axis):
- --> 341 axis = self._AXIS_ALIASES.get(axis, axis)
- 342 if is_integer(axis):
- 343 if axis in self._AXIS_NAMES:
- TypeError: unhashable type: 'list'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement