How to specify metadata for dask.dataframe
<p>Providing metadata became very important in  dask 0.11. The API provides some good examples, how to achieve that, but when it comes to picking the right dtypes for my dataframe, I still feel unsure.</p>

<ul>
<li>Could I do something like <code>meta={'x': int 'y': float,
'z': float}</code> instead of <code>meta={'x': 'i8', 'y': 'f8', 'z': 'f8'}</code>?</li>
<li>Could somebody hint me to a list of possible values like 'i8'?  What
dtypes exist? </li>
<li>How    can I specify a column, that contains arbitrary objects? How can I    specify a column, that contains only instances of one class?</li>
</ul>

<p>The available basic data types are the ones which are offered through numpy. Have a look at the <a href="http://docs.scipy.org/doc/numpy-1.10.1/user/basics.types.html" rel="nofollow">documentation</a> for a list.</p>

<p>Not included in this set are datetime-formats (e.g. <code>datetime64</code>), for which additional information can be found in the <a href="http://pandas.pydata.org/pandas-docs/stable/timeseries.html" rel="nofollow">pandas</a> and <a href="http://docs.scipy.org/doc/numpy/reference/arrays.datetime.html" rel="nofollow">numpy</a> documentation.</p>

<p>The meta-argument for dask dataframes usually expects an empty pandas dataframe holding definitions for columns, indices and dtypes.</p>

<p>One way to construct such a DataFrame is:</p>

<pre><code>import pandas as pd
import numpy as np
meta = pd.DataFrame(columns=['a', 'b', 'c'])
meta.a = meta.a.astype(np.int64)
meta.b = meta.b.astype(np.datetime64)
</code></pre>

<p>There is also a way to provide a dtype to the constructor of the pandas dataframe, however, I am not sure how to provide them for individual columns each. As you can see, it is possible to provide not only the "name" for datatypes, but also the actual numpy dtype.</p>

<p>Regarding your last question, the datatype you are looking for is "object". For example:</p>

<pre><code>import pandas as pd

class Foo:
    def __init__(self, foo):
        self.bar = foo

df = pd.DataFrame(data=[Foo(1), Foo(2)], columns=['a'], dtype='object')
df.a
# 0    &lt;__main__.Foo object at 0x00000000058AC550&gt;
# 1    &lt;__main__.Foo object at 0x00000000058AC358&gt;
</code></pre>

python pandas dask