I would like to know if could ask the get\_dummies function in pandas to output the dummies dataframe with a dtype lighter than the default float64.

So, for a sample dataframe with categorical columns:

```
In []: df = pd.DataFrame([(blue,wood),(blue,metal),(red,wood)],
                         columns=['C1','C2'])
In []: df
Out[]:
    C1      C2
0   blue    wood
1   blue    metal
2   red     wood

```

after getting the dummies, it looks like:

```
In []: df = pd.get_dummies(df)
In []: df    
Out[]:
 C1_blue    C1_red  C2_metal    C2_wood
0   1   0   0   1
1   1   0   1   0
2   0   1   0   1

```

which is perfectly fine. However, by default the 1's and 0's are float64:

```
In []: df.dtypes
Out[]: 
C1_blue     float64
C1_red      float64
C2_metal    float64
C2_wood     float64
dtype: object

```

I know I can change the dtype afterwards with `astype`:

```
In []: df = pd.get_dummies(df).astype(np.int8)

```

But I don't want to have the dataframe with floats in memory, because I am dealing with a big dataframe (from a csv of about ~5Gb). I would like to have the dummies directly as integers.