Advertisement
Guest User

Untitled

a guest
Jun 18th, 2018
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.50 KB | None | 0 0
  1. [5 rows x 5 columns]
  2. [############################## ] | 77% Completed | 0.3s/usr/local/lib/python2.7/site-packages/dask/dataframe/core.py:4235: UserWarning: Insufficient elements for `head`. 5 elements requested, only 1 elements available. Try passing larger `npartitions` to `head`.
  3. warnings.warn(msg.format(n, len(r)))
  4. [########################################] | 100% Completed | 0.4s
  5. [########################################] | 100% Completed | 0.1s
  6. Empty DataFrame
  7. Columns: []
  8. Index: [(2017-01-01 00:00:00, US.PRZ.03.01.2200.03)]
  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 103, in do_work
  16. df6 = df6.append(process_file(df).compute())
  17. File "amrith_code.py", line 79, in process_file
  18. df3 = df3.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