Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [5 rows x 5 columns]
- [############################## ] | 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`.
- warnings.warn(msg.format(n, len(r)))
- [########################################] | 100% Completed | 0.4s
- [########################################] | 100% Completed | 0.1s
- Empty DataFrame
- Columns: []
- Index: [(2017-01-01 00:00:00, US.PRZ.03.01.2200.03)]
- Exception in thread Thread-2:
- Traceback (most recent call last):
- 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
- self.run()
- File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 754, in run
- self.__target(*self.__args, **self.__kwargs)
- File "amrith_code.py", line 103, in do_work
- df6 = df6.append(process_file(df).compute())
- File "amrith_code.py", line 79, in process_file
- df3 = df3.drop(['cabinet_name','epoch_time'],axis=1)
- File "/usr/local/lib/python2.7/site-packages/dask/dataframe/core.py", line 2701, in drop
- return self.map_partitions(M.drop, labels, axis=axis, errors=errors)
- File "/usr/local/lib/python2.7/site-packages/dask/dataframe/core.py", line 575, in map_partitions
- return map_partitions(func, self, *args, **kwargs)
- File "/usr/local/lib/python2.7/site-packages/dask/dataframe/core.py", line 3508, in map_partitions
- meta = _emulate(func, *args, udf=True, **kwargs)
- File "/usr/local/lib/python2.7/site-packages/dask/dataframe/core.py", line 3472, in _emulate
- return func(*_extract_meta(args, True), **_extract_meta(kwargs, True))
- File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 35, in __exit__
- self.gen.throw(type, value, traceback)
- File "/usr/local/lib/python2.7/site-packages/dask/dataframe/utils.py", line 154, in raise_on_meta_error
- raise ValueError(msg)
- ValueError: Metadata inference failed in `drop`.
- You have supplied a custom function and Dask is unable to
- determine the type of output that that function returns.
- To resolve this please provide a meta= keyword.
- The docstring of the Dask function you ran should have more information.
- Original error is below:
- ------------------------
- KeyError("labels ['cabinet_name' 'epoch_time'] not contained in axis",)
- Traceback:
- ---------
- File "/usr/local/lib/python2.7/site-packages/dask/dataframe/utils.py", line 137, in raise_on_meta_error
- yield
- File "/usr/local/lib/python2.7/site-packages/dask/dataframe/core.py", line 3472, in _emulate
- return func(*_extract_meta(args, True), **_extract_meta(kwargs, True))
- File "/usr/local/lib/python2.7/site-packages/dask/utils.py", line 687, in __call__
- return getattr(obj, self.method)(*args, **kwargs)
- File "/usr/local/lib/python2.7/site-packages/pandas/core/frame.py", line 3694, in drop
- errors=errors)
- File "/usr/local/lib/python2.7/site-packages/pandas/core/generic.py", line 3108, in drop
- obj = obj._drop_axis(labels, axis, level=level, errors=errors)
- File "/usr/local/lib/python2.7/site-packages/pandas/core/generic.py", line 3140, in _drop_axis
- new_axis = axis.drop(labels, errors=errors)
- File "/usr/local/lib/python2.7/site-packages/pandas/core/indexes/base.py", line 4387, in drop
- 'labels %s not contained in axis' % labels[mask])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement