The basic data types available are those offered through numpy. See the documentation for a list.
This set does not include datetime-formats (e.g. datetime64 ), for which additional information can be found in pandas and numpy .
The meta argument for dask frames usually assumes that pandas are empty data frame definitions for columns, indexes, and types.
One way to build such a DataFrame:
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)
There is also a way to provide dtype to the pandas frame constructor, however I'm not sure how to provide them for individual columns each. As you can see, you can provide not only the βnameβ for the data types, but also the actual numpy dtype type.
As for your last question, the data type you are looking for is an βobjectβ. For instance:
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
source share