public function filterByColumn(int $index, callable $fn) : self
    {
        $samples = $labels = [];

        foreach ($this->samples as $i => $sample) {
            if ($fn($sample[$index])) {
                $samples[] = $sample;
                $labels[] = $this->labels[$i];
            }
        }

        return self::quick($samples, $labels);
    }