Advertisement
Guest User

Untitled

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