I am sorry, I found (probably) a solution (my actual example):
#+NAME:electro
| TIME | low | high | heatpump | water | accurain | repy1 | repy2 | repy3 | repy4 |
|-------------------------+-------+------+----------+-------+----------+-------+-------+-------+-------|
| 2016-10-15 08:41:00.000 | 24830 | 3242 | 7308 | 2294 | NaN | | | | |
| 2016-10-23 10:38:53.000 | 24963 | 3254 | 7362 | 2317 | | | | | |
| 2016-10-30 19:36:38.000 | 25107 | 3265 | 7417 | 2342 | | | | | |
|
#+BEGIN_SRC python :var tbl=electro :hlines no :colnames no :results replace output :session test :exports both
import pandas as pd
df = pd.DataFrame(tbl[1:], columns=tbl[0])
# and now more tricks...
df = df.replace('', np.nan)
df = df.replace('NaN', np.nan)
print(df)
df.to_hdf("test.h5",key="key1",mode='w')
#+END_SRC
The solution was to add :colnames no
to prevent babel from removing the header.