public function columnType(int $index) : int
    {
        if (empty($this->samples)) {
            throw new RuntimeException('Cannot determine data type'
                . ' of an empty data frame.');
        }

        $sample = reset($this->samples);

        if (!isset($sample[$index])) {
            throw new InvalidArgumentException("Column $index does"
             . ' not exist.');
        }

        return DataType::determine($sample[$index]);
    }