diff --git a/.travis.yml b/.travis.yml
index ff5dd0e..071380c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,6 +8,7 @@ before_install:
   # The next couple lines fix a crash with multiprocessing on Travis and are not specific to using Miniconda
   - sudo rm -rf /dev/shm
   - sudo ln -s /run/shm /dev/shm
+  - pip install --upgrade pip
 
 install:
   - pip install restructuredtext-lint sphinx pygments
diff --git a/fact/VERSION b/fact/VERSION
index d9df1bb..af88ba8 100644
--- a/fact/VERSION
+++ b/fact/VERSION
@@ -1,1 +1,1 @@
-0.11.0
+0.11.1
diff --git a/fact/io.py b/fact/io.py
index 5e5d175..26e6183 100644
--- a/fact/io.py
+++ b/fact/io.py
@@ -258,7 +258,7 @@ def to_h5py(filename, df, key='data', mode='a', dtypes=None, index=True, **kwarg
 
     with h5py.File(filename, mode=mode) as f:
         if key not in f:
-            initialize_h5py(f, array.dtype, key=key, **kwargs)
+            initialize_h5py(f, array, key=key, **kwargs)
 
         append_to_h5py(f, array, key=key)
 
@@ -293,7 +293,7 @@ def change_recarray_dtype(array, dtypes):
     return array.astype(dt)
 
 
-def initialize_h5py(f, dtypes, key='events', **kwargs):
+def initialize_h5py(f, array, key='events', **kwargs):
     '''
     Create a group with name `key` and empty datasets for each
     entry in dtypes.
@@ -302,9 +302,8 @@ def initialize_h5py(f, dtypes, key='events', **kwargs):
     ----------
     f: h5py.File
         the hdf5 file, opened either in write or append mode
-    dtypes: numpy.dtype
-        the numpy dtype object of a record or structured array describing
-        the columns
+    array: numpy structured array
+        The data
     key: str
         the name for the hdf5 group to hold all datasets, default: data
 
@@ -312,13 +311,19 @@ def initialize_h5py(f, dtypes, key='events', **kwargs):
     '''
     group = f.create_group(key)
 
+    dtypes = array.dtype
     for name in dtypes.names:
         dtype = dtypes[name]
         maxshape = [None] + list(dtype.shape)
         shape = [0] + list(dtype.shape)
 
         if dtype.base == object:
-            dt = h5py.special_dtype(vlen=str)
+            if isinstance(array[name][0], list):
+                dt = np.array(array[name][0]).dtype
+                shape = [0, len(array[name][0])]
+                maxshape = [None, len(array[name][0])]
+            else:
+                dt = h5py.special_dtype(vlen=str)
 
         elif dtype.type == np.datetime64:
             # save dates as ISO string, create dummy date to get correct length
@@ -372,6 +377,10 @@ def append_to_h5py(f, array, key='events'):
         if data.dtype.type == np.datetime64:
             data = data.astype('S')
 
+        if data.dtype.base == object:
+            if isinstance(data[0], list):
+                data = np.array([o for o in data])
+
         if data.ndim == 1:
             dataset[n_existing_rows:] = data
 

to_h5py converts lists in dataframes to strings
This is because if dtype is object, than str is assumend.
diff --git a/tests/test_io.py b/tests/test_io.py
index c034d91..472f8df 100644
--- a/tests/test_io.py
+++ b/tests/test_io.py
@@ -178,6 +178,21 @@ def test_write_data_h5py():
         write_data(df, f.name, use_h5py=True)
 
 
+def test_write_lists_h5py():
+    from fact.io import to_h5py, read_h5py
+
+    df = pd.DataFrame({
+        'x': [[1.0, 2.0], [3.0, 4.0]]
+    })
+
+    with tempfile.NamedTemporaryFile(suffix='.hdf5') as f:
+        to_h5py(f.name, df)
+
+        df = read_h5py(f.name, columns=['x'])
+
+        assert df['x_0'].iloc[0] == 1.0
+
+
 def test_write_data_root():
     from fact.io import write_data
 

pip install -e .
parse_log_pytest
requirements.txt
pytest restructuredtext-lint sphinx pygments
apt-get update apt-get install -y gcc
3.6
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alabaster==0.7.13
astropy==4.1
attrs==22.2.0
Babel==2.11.0
cached-property==1.5.2
certifi==2021.5.30
charset-normalizer==2.0.12
cycler==0.11.0
docutils==0.18.1
greenlet==2.0.2
h5py==3.1.0
idna==3.10
imagesize==1.4.1
importlib-metadata==4.8.3
iniconfig==1.1.1
Jinja2==3.0.3
kiwisolver==1.3.1
MarkupSafe==2.0.1
matplotlib==3.3.4
numexpr==2.8.1
numpy==1.19.5
packaging==21.3
pandas==1.1.5
peewee==3.17.9
Pillow==8.4.0
pluggy==1.0.0
py==1.11.0
pycrypto==2.6.1
-e git+https://github.com/fact-project/pyfact.git@58e9bdbae66a65f16f900fe65560d3c83592c4b5#egg=pyfact
Pygments==2.14.0
pymongo==4.1.1
PyMySQL==1.0.2
pyparsing==3.1.4
pytest==7.0.1
python-dateutil==2.9.0.post0
pytz==2025.2
requests==2.27.1
restructuredtext-lint==1.4.0
scipy==1.5.4
simple-crypt==4.1.7
six==1.17.0
snowballstemmer==2.2.0
Sphinx==5.3.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
SQLAlchemy==1.4.54
tables==3.7.0
tomli==1.2.3
typing_extensions==4.1.1
urllib3==1.26.20
wrapt==1.16.0
zipp==3.6.0

name: pyfact
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - alabaster==0.7.13
      - astropy==4.1
      - attrs==22.2.0
      - babel==2.11.0
      - cached-property==1.5.2
      - charset-normalizer==2.0.12
      - cycler==0.11.0
      - docutils==0.18.1
      - greenlet==2.0.2
      - h5py==3.1.0
      - idna==3.10
      - imagesize==1.4.1
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - jinja2==3.0.3
      - kiwisolver==1.3.1
      - markupsafe==2.0.1
      - matplotlib==3.3.4
      - numexpr==2.8.1
      - numpy==1.19.5
      - packaging==21.3
      - pandas==1.1.5
      - peewee==3.17.9
      - pillow==8.4.0
      - pluggy==1.0.0
      - py==1.11.0
      - pycrypto==2.6.1
      - pygments==2.14.0
      - pymongo==4.1.1
      - pymysql==1.0.2
      - pyparsing==3.1.4
      - pytest==7.0.1
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - requests==2.27.1
      - restructuredtext-lint==1.4.0
      - scipy==1.5.4
      - simple-crypt==4.1.7
      - six==1.17.0
      - snowballstemmer==2.2.0
      - sphinx==5.3.0
      - sphinxcontrib-applehelp==1.0.2
      - sphinxcontrib-devhelp==1.0.2
      - sphinxcontrib-htmlhelp==2.0.0
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==1.0.3
      - sphinxcontrib-serializinghtml==1.1.5
      - sqlalchemy==1.4.54
      - tables==3.7.0
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - wrapt==1.16.0
      - zipp==3.6.0
prefix: /opt/conda/envs/pyfact

tests/test_io.py::test_write_lists_h5py
tests/test_io.py::test_to_h5py tests/test_io.py::test_to_h5py_string tests/test_io.py::test_write_data_pandas_hdf tests/test_io.py::test_write_data_h5py
tests/test_io.py::test_to_h5py_datetime tests/test_io.py::test_to_h5py_append tests/test_io.py::test_to_h5py_append_second_group tests/test_io.py::test_write_data_csv tests/test_io.py::test_write_data_json tests/test_io.py::test_write_data_jsonlines tests/test_io.py::test_write_data_root
.travis.yml fact/io.py fact/VERSION
.travis.yml fact/io.py fact/VERSION