Advertisement
Guest User

Untitled

a guest
Jun 18th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.45 KB | None | 0 0
  1. day_date cabinet_name ... epoch_time sum_pwr
  2. 0 2017-01-01 US.PRZ.03.01.2200.03.001 ... 1483228800 2.3368
  3. 1 2017-01-01 US.PRZ.03.01.2200.03.002 ... 1483228800 4.6188
  4. 2 2017-01-01 US.PRZ.03.01.2200.03.003 ... 1483228800 2.2688
  5. 3 2017-01-01 US.PRZ.03.01.2200.03.004 ... 1483228800 2.1966
  6. 4 2017-01-01 US.PRZ.03.01.2200.03.005 ... 1483228800 2.2108
  7.  
  8. [5 rows x 5 columns]
  9. Exception in thread Thread-2:
  10. Traceback (most recent call last):
  11. File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 801, in __bootstrap_inner
  12. self.run()
  13. File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 754, in run
  14. self.__target(*self.__args, **self.__kwargs)
  15. File "amrith_code.py", line 100, in do_work
  16. df6 = df6.append(process_file(df).compute())
  17. File "amrith_code.py", line 77, in process_file
  18. df3 = (df2.groupby(['day_date','row_name']).max().reset_index()).drop(['cabinet_name','epoch_time'],axis=1)
  19. File "/usr/local/lib/python2.7/site-packages/dask/dataframe/core.py", line 2701, in drop
  20. return self.map_partitions(M.drop, labels, axis=axis, errors=errors)
  21. File "/usr/local/lib/python2.7/site-packages/dask/dataframe/core.py", line 575, in map_partitions
  22. return map_partitions(func, self, *args, **kwargs)
  23. File "/usr/local/lib/python2.7/site-packages/dask/dataframe/core.py", line 3508, in map_partitions
  24. meta = _emulate(func, *args, udf=True, **kwargs)
  25. File "/usr/local/lib/python2.7/site-packages/dask/dataframe/core.py", line 3472, in _emulate
  26. return func(*_extract_meta(args, True), **_extract_meta(kwargs, True))
  27. File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 35, in __exit__
  28. self.gen.throw(type, value, traceback)
  29. File "/usr/local/lib/python2.7/site-packages/dask/dataframe/utils.py", line 154, in raise_on_meta_error
  30. raise ValueError(msg)
  31. ValueError: Metadata inference failed in `drop`.
  32.  
  33. You have supplied a custom function and Dask is unable to
  34. determine the type of output that that function returns.
  35.  
  36. To resolve this please provide a meta= keyword.
  37. The docstring of the Dask function you ran should have more information.
  38.  
  39. Original error is below:
  40. ------------------------
  41. KeyError("labels ['cabinet_name' 'epoch_time'] not contained in axis",)
  42.  
  43. Traceback:
  44. ---------
  45. File "/usr/local/lib/python2.7/site-packages/dask/dataframe/utils.py", line 137, in raise_on_meta_error
  46. yield
  47. File "/usr/local/lib/python2.7/site-packages/dask/dataframe/core.py", line 3472, in _emulate
  48. return func(*_extract_meta(args, True), **_extract_meta(kwargs, True))
  49. File "/usr/local/lib/python2.7/site-packages/dask/utils.py", line 687, in __call__
  50. return getattr(obj, self.method)(*args, **kwargs)
  51. File "/usr/local/lib/python2.7/site-packages/pandas/core/frame.py", line 3694, in drop
  52. errors=errors)
  53. File "/usr/local/lib/python2.7/site-packages/pandas/core/generic.py", line 3108, in drop
  54. obj = obj._drop_axis(labels, axis, level=level, errors=errors)
  55. File "/usr/local/lib/python2.7/site-packages/pandas/core/generic.py", line 3140, in _drop_axis
  56. new_axis = axis.drop(labels, errors=errors)
  57. File "/usr/local/lib/python2.7/site-packages/pandas/core/indexes/base.py", line 4387, in drop
  58. 'labels %s not contained in axis' % labels[mask])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement