“Factor” has many different meanings, so I think you’ll have to be more explicit. Though if it’s used in the R sense, have a look at PooledDataArray in the DataArrays package. There’s also CategoricalArray in the eponymous package, which will be used by the next DataFrames release.