Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- day_date cabinet_name ... epoch_time sum_pwr
- 0 2017-01-01 US.PRZ.03.01.2200.03.001 ... 1483228800 2.3368
- 1 2017-01-01 US.PRZ.03.01.2200.03.002 ... 1483228800 4.6188
- 2 2017-01-01 US.PRZ.03.01.2200.03.003 ... 1483228800 2.2688
- 3 2017-01-01 US.PRZ.03.01.2200.03.004 ... 1483228800 2.1966
- 4 2017-01-01 US.PRZ.03.01.2200.03.005 ... 1483228800 2.2108
- [5 rows x 5 columns]
- 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 100, in do_work
- df6 = df6.append(process_file(df).compute())
- File "amrith_code.py", line 77, in process_file
- df3 = (df2.groupby(['day_date','row_name']).max().reset_index()).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