Revert "TST: skip pytables test with not-updated pytables conda packa…
State: closed

…ge (#22099)"

This reverts commit 017e910a90cbb29c0f844f4d6aa966ebb5cd680a.

closes https://github.com/pandas-dev/pandas/issues/22098

Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Build
description: Library building on various platforms

Comments:
@jreback do you recall why you added this skip? https://github.com/pandas-dev/pandas/pull/22178 is failing because it wasn't backported with errors like

```python
=================================== FAILURES ===================================
__________________ TestHDFStore.test_calendar_roundtrip_issue __________________
self = <pandas.tests.io.test_pytables.TestHDFStore object at 0x7f9cd07d7908>
    def test_calendar_roundtrip_issue(self):
    
        # 8591
        # doc example from tseries holiday section
        weekmask_egypt = 'Sun Mon Tue Wed Thu'
        holidays = ['2012-05-01',
                    datetime.datetime(2013, 5, 1), np.datetime64('2014-05-01')]
        bday_egypt = pd.offsets.CustomBusinessDay(
            holidays=holidays, weekmask=weekmask_egypt)
        dt = datetime.datetime(2013, 4, 30)
        dts = date_range(dt, periods=5, freq=bday_egypt)
    
        s = (Series(dts.weekday, dts).map(
            Series('Mon Tue Wed Thu Fri Sat Sun'.split())))
    
        with ensure_clean_store(self.path) as store:
    
>           store.put('fixed', s)
pandas/tests/io/test_pytables.py:2160: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pandas/io/pytables.py:890: in put
    self._write_to_group(key, value, append=append, **kwargs)
pandas/io/pytables.py:1367: in _write_to_group
    s.write(obj=value, append=append, complib=complib, **kwargs)
pandas/io/pytables.py:2808: in write
    self.write_index('index', obj.index)
pandas/io/pytables.py:2553: in write_index
    node._v_attrs.freq = index.freq
../../../miniconda3/envs/pandas/lib/python3.6/site-packages/tables/attributeset.py:494: in __setattr__
    self._g__setattr(name, value)
../../../miniconda3/envs/pandas/lib/python3.6/site-packages/tables/attributeset.py:436: in _g__setattr
    self._g_setattr(self._v_node, name, stvalue)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
>   ???
E   BufferError: could not get scalar buffer information
tables/hdf5extension.pyx:708: BufferError
```
I can reproduce that locally.
Hmm this CustomBusinessDay isn't picklable

```pdb
(Pdb) stvalue
<CustomBusinessDay>
(Pdb) pickle.dumps(stvalue)
*** BufferError: could not get scalar buffer information
```

tha'ts the same error eventually coming from pytables, so this is likely on us.
```python
        holidays = ['2012-05-01',
                    datetime.datetime(2013, 5, 1), np.datetime64('2014-05-01')]
 ```

that `np.datetime64('2014-05-01')` can't be pickled. Anyone know why we construct the holidays like that?
@TomAugspurger I did this because I thought the pytables packages was not completely compat with numpy 1.15. Not really sure though. If it passes now, maybe the package was updated? this started failing as soon as 1.15 was released.
Gotcha, I think it's just NumPy 1.15. https://github.com/numpy/numpy/issues/11656
I don't see an easy workaround... So I think I'm going to just cherry pick the skip to the backports.
ahh good to know. thanks @TomAugspurger 
@TomAugspurger 
def parallel_apply(data, fun, args):
    pool = mp.Pool(mp.cpu_count() - 1)
    result = [pool.apply(fun, (data.loc[x, :], *args)) for x in data.index]
    result = [p.get() for p in result]
    end_result = pd.concat(result)
    return end_result

from this part of code i also get following error "BufferError: could not get scalar buffer information".  i tried several things to solve it but non of them worked. Any sugesstion? Thanks for help
closing this, pending resolution of #22098 which is pending https://github.com/numpy/numpy/issues/11656