Advertisement
Guest User

Untitled

a guest
May 25th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.79 KB | None | 0 0
  1. ---------------------------------------------------------------------------
  2. TypeError                                 Traceback (most recent call last)
  3. <ipython-input-1-10a5f5b12254> in <module>()
  4.      20 print("Database connection is closed now ")
  5.      21 df.columns = fields
  6. ---> 22 df.describe(include='all')
  7.  
  8. /usr/lib/python3.6/site-packages/pandas/core/generic.py in describe(self, percentiles, include, exclude)
  9.    8568             data = self.select_dtypes(include=include, exclude=exclude)
  10.    8569
  11. -> 8570         ldesc = [describe_1d(s) for _, s in data.iteritems()]
  12.    8571         # set a convenient order for rows
  13.    8572         names = []
  14.  
  15. /usr/lib/python3.6/site-packages/pandas/core/generic.py in <listcomp>(.0)
  16.    8568             data = self.select_dtypes(include=include, exclude=exclude)
  17.    8569
  18. -> 8570         ldesc = [describe_1d(s) for _, s in data.iteritems()]
  19.    8571         # set a convenient order for rows
  20.    8572         names = []
  21.  
  22. /usr/lib/python3.6/site-packages/pandas/core/generic.py in describe_1d(data)
  23.    8551                 return describe_numeric_1d(data)
  24.    8552             else:
  25. -> 8553                 return describe_categorical_1d(data)
  26.    8554
  27.    8555         if self.ndim == 1:
  28.  
  29. /usr/lib/python3.6/site-packages/pandas/core/generic.py in describe_categorical_1d(data)
  30.    8525         def describe_categorical_1d(data):
  31.    8526             names = ['count', 'unique']
  32. -> 8527             objcounts = data.value_counts()
  33.    8528             count_unique = len(objcounts[objcounts != 0])
  34.    8529             result = [data.count(), count_unique]
  35.  
  36. /usr/lib/python3.6/site-packages/pandas/core/base.py in value_counts(self, normalize, sort, ascending, bins, dropna)
  37.    1036         from pandas.core.algorithms import value_counts
  38.    1037         result = value_counts(self, sort=sort, ascending=ascending,
  39. -> 1038                               normalize=normalize, bins=bins, dropna=dropna)
  40.    1039         return result
  41.    1040
  42.  
  43. /usr/lib/python3.6/site-packages/pandas/core/algorithms.py in value_counts(values, sort, ascending, normalize, bins, dropna)
  44.     714
  45.     715         else:
  46. --> 716             keys, counts = _value_counts_arraylike(values, dropna)
  47.     717
  48.     718             if not isinstance(keys, Index):
  49.  
  50. /usr/lib/python3.6/site-packages/pandas/core/algorithms.py in _value_counts_arraylike(values, dropna)
  51.     759         # TODO: handle uint8
  52.     760         f = getattr(htable, "value_count_{dtype}".format(dtype=ndtype))
  53. --> 761         keys, counts = f(values, dropna)
  54.     762
  55.     763         mask = isna(values)
  56.  
  57. pandas/_libs/hashtable_func_helper.pxi in pandas._libs.hashtable.value_count_object()
  58.  
  59. pandas/_libs/hashtable_func_helper.pxi in pandas._libs.hashtable.value_count_object()
  60.  
  61. TypeError: unhashable type: 'list'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement