This might be a basic approach to what you need although I don't know how resource hungry it might prove to be.
import petl as etl
import pandas as pd
table = etl.frompickle('temp.pickle')
print (table)
dtypes = {}
for fieldName in table.fieldnames():
typeset = [_ for _ in list(etl.typeset(table, fieldName)) if _ != 'NoneType']
if len(typeset) > 1:
print ('Warning: more than one type found, using convenient value found')
dtypes[fieldName]=typeset[0]
cols = etl.columns(table)
first = True
for fieldname in table.fieldnames():
if first:
df = pd.DataFrame.from_dict({fieldname: cols[fieldname]}, dtype=dtypes[fieldname])
first = False
else:
column = pd.DataFrame.from_dict({fieldname: cols[fieldname]}, dtype=dtypes[fieldname])
df = df.join(column)
print (df)
Here is the output for your example, slightly modified.
+-----+------+------+-------+
| cis | boom | bah | bish |
+=====+======+======+=======+
| A | 1 | None | True |
+-----+------+------+-------+
| B | None | 1.0 | False |
+-----+------+------+-------+
| C | 11 | None | False |
+-----+------+------+-------+
cis boom bah bish
0 A 1 NaN True
1 B None 1.0 False
2 C 11 NaN False
I omitted one of the integer values (for 'boom') because there's no NaN for integers and I wanted to learn how to cope with this. I'm not clear what the answer might be for numpy — some answers seemed quite ugly — so I avoided it. Without a declaration of dtype pandas converts boom to float. Which is why I've included the code that exercises petl's typeset stuff. This is a very basic approach. If you have columns that include both integer and float values then you might wish to expand this so that float is chosen over integer type and passed to pandas.