μ΄ λ¬Έμ κ° ν΄κ²°λλ©΄ https://github.com/pandas-dev/pandas/pull/25517 μμ xfail λ°μ½λ μ΄ν°λ₯Ό λλλ € μΌν©λλ€.
κ°μκΈ°μ΄ μ€λ₯κ° λ°μνμ΅λλ€.
# Your code here
input_df = pd.read_hdf(path_or_buf='x.hdf5',key='/x',mode='r')
μ μΆμ :
`
Traceback (most recent call last):
File "...", line 115, in <module>
input_df = pd.read_hdf(path_or_buf='x.hdf5',key='/x',mode='r')
File "/usr/local/lib/python3.6/dist-packages/pandas/io/pytables.py", line 394, in read_hdf
return store.select(key, auto_close=auto_close, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/pandas/io/pytables.py", line 741, in select
return it.get_result()
File "/usr/local/lib/python3.6/dist-packages/pandas/io/pytables.py", line 1483, in get_result
results = self.func(self.start, self.stop, where)
File "/usr/local/lib/python3.6/dist-packages/pandas/io/pytables.py", line 734, in func
columns=columns)
File "/usr/local/lib/python3.6/dist-packages/pandas/io/pytables.py", line 2937, in read
start=_start, stop=_stop)
File "/usr/local/lib/python3.6/dist-packages/pandas/io/pytables.py", line 2489, in read_array
ret = node[0][start:stop]
File "/usr/local/lib/python3.6/dist-packages/tables/vlarray.py", line 681, in __getitem__
return self.read(start, stop, step)[0]
File "/usr/local/lib/python3.6/dist-packages/tables/vlarray.py", line 821, in read
listarr = self._read_array(start, stop, step)
File "tables/hdf5extension.pyx", line 2155, in tables.hdf5extension.VLArray._read_array
ValueError: cannot set WRITEABLE flag to True of this array
@ macd2 : μ κ³ ν΄ μ£Όμ μ κ°μ¬ν©λλ€! λͺ κ°μ§ :
pandas.show_versions
μ νκ²½ μ 보λ₯Ό μ 곡 ν μ μμ΅λκΉ?κ°μκΈ°μ΄ μ€λ₯κ° λ°μνμ΅λλ€.
pandas
μ μ΄μ λ²μ μμ μλνλ κ² κ°μ΅λλ€. μ΄ μ½λκ° μΈμ λ§μ§λ§μΌλ‘ μλ νμ΅λκΉ? νμ¬ μ¬μ©μ€μΈ λ²μ μ 무μμ
λκΉ (첫 λ²μ§Έ μ§λ¬Έκ³Ό κ΄λ ¨)?cc @jreback
numpy = 1.16.0μ μ¬μ©ν λ numpy = 1.15.4 λ¬Έμ λ₯Ό λ€μ΄ κ·Έλ μ΄λνλ©΄μ΄ μ€λ₯κ° λ°μν©λλ€.
@gfyoung μ¬κΈ° λ²μ μ΄ μμ΅λλ€.
```pandas.show_versions
'μ’
μμ±':
{ 'pandas': '0.23.4', 'pytest': '3.4.0', 'pip': '18 .1 ','setuptools ': '40 .6.3', 'Cython': '0.29.3', ' numpy ':'1.16.0 ','scipy ':'1.2.0 ','pyarrow ': μμ,'xarray ': μμ,'IPython ':'6.5.0 ','sphinx ': μμ,'patsy ' : '0.5.0', 'dateutil': '2.7.5', 'pytz': '2018.7', 'blosc': μμ, 'bottleneck': '1.2.1', 'tables': '3.4.4' , 'numexpr': '2.6.8', 'feather': μμ, 'matplotlib': '3.0.2', 'openpyxl': '2.5.12', 'xlrd': '1.1.0', 'xlwt' : '1.3.0', 'xlsxwriter': '0.7.3', 'lxml': '4.1.1', 'bs4': '4.4.1', 'html5lib': '1.0b8', 'sqlalchemy': '1.2.15', 'pymysql': '0.9.2', 'psycopg2': '2.7.6.1 (dt dec pq3 ext lo64)', 'jinja2': '2.10', 's3fs': μμ, 'fastparquet' : μμ, 'pandas_gbq': μμ, 'pandas_datareader': '0.7.0'}
```
λΆννλ νμΌμ 곡μ ν μλ μμ§λ§ @vvvlc κ° gitμ λν λ€λ₯Έ λ¬Έμ κ° μλ€κ³ λ§νλ―μ΄ λ¬Έμ λ μ€μ λ‘ numpyμμ
https://github.com/nipy/nibabel/issues/697
PS: just downgraded to numpy=1.15.4 and indeed it resolves the issue
κ·Έλμ ν¬λκ° ν μμλ μΌμ΄ μλμ? μλλ©΄ κ·Έλ₯ λ€μμ κΈ°λ€λ €
pytables μΆμ?
2019 λ 1 μ 21 μΌ μμμΌ μ€μ 5:34 macd2 [email protected] μμ± :
@gfyoung https://github.com/gfyoung μ¬κΈ° λ²μ μ΄ μμ΅λλ€.
'μ’ μμ±':
{ 'pandas': '0.23.4', 'pytest': '3.4.0', 'pip': '18 .1 ','setuptools ': '40 .6.3', 'Cython': '0.29.3', ' numpy ':'1.16.0 ','scipy ':'1.2.0 ','pyarrow ': μμ,'xarray ': μμ,'IPython ':'6.5.0 ','sphinx ': μμ,'patsy ' : '0.5.0', 'dateutil': '2.7.5', 'pytz': '2018.7', 'blosc': μμ, 'bottleneck': '1.2.1', 'tables': '3.4.4' , 'numexpr': '2.6.8', 'feather': μμ, 'matplotlib': '3.0.2', 'openpyxl': '2.5.12', 'xlrd': '1.1.0', 'xlwt' : '1.3.0', 'xlsxwriter': '0.7.3', 'lxml': '4.1.1', 'bs4': '4.4.1', 'html5lib': '1.0b8', 'sqlalchemy': '1.2.15', 'pymysql': '0.9.2', 'psycopg2': '2.7.6.1 (dt dec pq3 ext lo64)', 'jinja2': '2.10', 's3fs': μμ, 'fastparquet' : μμ, 'pandas_gbq': μμ, 'pandas_datareader': '0.7.0'}μνκΉκ²λ νμΌμ 곡μ ν μ μμ§λ§ λ¬Έμ κ° μ€μ λ‘ λ°μνλ€κ³ μκ°ν©λλ€.
@vvvlc https://github.com/vvvlc λ‘ numpyμμ μ¬κΈ°μ λ€λ₯Έ κ²μ΄ μλ€κ³ λ§νμ΅λλ€.
κ·Έλ€μ μμμ λν λ¬Έμ :nipy / nibabel # 697 https://github.com/nipy/nibabel/issues/697
β
μ΄ μ€λ λλ₯Ό ꡬλ νκΈ° λλ¬Έμμ΄ λ©μμ§κ° μ μ‘λμμ΅λλ€.
μ΄ μ΄λ©μΌμ μ§μ λ΅μ₯νκ³ GitHubμμ νμΈνμΈμ.
https://github.com/pandas-dev/pandas/issues/24839#issuecomment-456043488 ,
λλ μ€λ λ μμκ±°
https://github.com/notifications/unsubscribe-auth/ABQHIqiIyuE-lmMlN2Ep-4htyMrTBdefks5vFaWqgaJpZM4aJQqs
.
μ μκ² pip install numpy==1.15.4
λμ΄ λ¬Έμ λ₯Ό ν΄κ²°ν©λλ€.
@TomAugspurger μ΄ λ¬Έμ λ Googleμμ 맨 μμ λ³΄μ΄ λ―λ‘ μ μ€νΈλ¦Ό μμ μ κΈ°λ€λ¦¬λ κ²μΌλ‘ μΆ©λΆν μ μμ΅λλ€. λΉμ μ΄ λ¬Όμ΄λ³Ό μ λ§ λλ¨ν©λλ€ :)
pip3 install numpy==1.15.4
λ ν΄κ²°νμ΅λλ€ ..
κ·Έλ¬λ numpyλ₯Ό λ€μ΄ κ·Έλ μ΄λνμ λ ImportError: No module named 'numpy.core._multiarray_umath'
μ€λ₯κ° κ³μ λ°μνμ΅λλ€. λ§μ§λ§μΌλ‘ numpy 1.16μ΄ μ€μΉλ .h5 νμΌμ μ μ₯νκ³ λ€μ΄ κ·Έλ μ΄λ λ numpyλ‘ λ€μ μ΄λ¦¬μ§ μκΈ° λλ¬Έμ λ°μνλ€λ κ²μ μκ²λμμ΅λλ€ ...
μ€λ₯λ₯Ό νΌν μ μμ΅λλ€.
ValueError: cannot set WRITEABLE flag to True of this array
Pandasλ‘ λ°μ΄ν°λ₯Ό μ μ₯ν λ format='table'
μ HDFStore.append
λλ HDFStore.put
μ μ λ¬ν©λλ€.
μ΄κ²μ pandas 0.24 λ° numpy 1.16+λ‘ ν μ€νΈνμ¬ λ¬Έμ λ₯Ό ν΄κ²°ν μ μμ΅λλ€.
@ dev72
κ·Έλλ μ΄λ―Έ μ‘΄μ¬νλ μ€λλ HDF νμΌμ μ΄λ»μ΅λκΉ?
μ€λλ hdf νμΌμ μ½λ κ°μ₯ μ’μ λ°©λ²μ pandas + numpy λ²μ μ λ€μ΄ κ·Έλ μ΄λνκ³ λͺ¨λ λ°μ΄ν°λ₯Ό μ½κ³ format='table'
λ‘ μ hdf μ μ₯μμ μ°λ κ²μ
λλ€.
κ·Έλ° λ€μ μ΅μ numpy λ° pandas λ²μ μμ μλν©λλ€.
@ dev72 μ λ§μ΅λλ€ κ°μ μ§μ μμ im, κ·Έλ¬λ μ΄κ²μ΄ μ λλ‘ μμ λ λκΉμ§ λ€μ΄ κ·Έλ μ΄λλ₯Ό κ³ μνλ κ²λ³΄λ€
μ, Googleμμλ λ§μ°¬κ°μ§μ λλ€. @ macd2 λ¬Έμ λ₯Ό
λ°λΌμ numpy
λ° PyTables
μ μΆ λ λͺ κ°μ§ λ¬Έμ λ₯Ό μ΄ν΄λ³Έ ν PyTables
λ§μ€ν°μμ μμ λμμ§λ§ μμ§ λ¦΄λ¦¬μ€μμλ ν΄κ²°λμ§ μμ μ μ μ μν©λλ€.
https://github.com/PyTables/PyTables/issues/719#issuecomment -455612656
PyTables
master w / numpy >= 0.16
μ¬μ©μ μλν μ¬λμ΄ μμ΅λκΉ?
λλ μ΄κ²μ μ¬μ©νμ¬ μλνκ²νμ΅λλ€.
HDF5_DIR={HDF5_PATH} pip install -e git+https://github.com/PyTables/PyTables@492ee2f#egg=tables
pip install numpy==1.16.0
cython λ° hdf5κ° μ€μΉλμ΄ μλμ§ νμΈνμμμ€.
μ΄λ€ λ²μ μ pytablesμ numpyκ° μ΄κ²μ μ¬νν©λκΉ? λ°μ΄ν°μ κ΄λ ¨λ κ²μ λκΉ?
μ
pandas: 0.24.1
numpy: 1.16.2
tables: 3.4.4
μ΄κ²μ μ¬λ¦¬μ§ μμ΅λλ€.
In [8]: df = pd.DataFrame({"A": [1, 2]})
In [9]: df.to_hdf('x.hdf5', key='x')
In [10]: pd.read_hdf('x.hdf5', 'x', mode='r')
Out[10]:
A
0 1
1 2
μ°Έκ³ λ‘, pytables 3.5.0 λ° 3.5.1μ pytables μΈ‘μμ μμ ν PyPIμ μμ΅λλ€.
pytables 3.5.1λ‘ μ κ·Έλ μ΄λνλ©΄ numpy 1.16.2μμλ λ¬Έμ κ° ν΄κ²°λ©λλ€.
tf 2.0.0μ μ²λ¦¬νλ €λ©΄ numpy (μ μ΄λ) 1.16.0μ΄ νμν©λλ€. numpyλ₯Ό μ΄μ λ²μ μΌλ‘ λ€μ΄ κ·Έλ μ΄λνλ©΄ tf 2.0.0μμ μλνμ§ μμ΅λλ€.
κ°μ₯ μ μ©ν λκΈ
numpy = 1.16.0μ μ¬μ©ν λ numpy = 1.15.4 λ¬Έμ λ₯Ό λ€μ΄ κ·Έλ μ΄λνλ©΄μ΄ μ€λ₯κ° λ°μν©λλ€.