public function toIndexed($data, $fillMissing = false) {
	foreach ($data as $key => $value) {
		if(!in_array($key, $this->headers)) {
			throw new InvalidFieldException($key);
		}
		$headerIndex = (int)array_search($key, $this->headers);
		$data[$headerIndex] = $value;
		unset($data[$key]);
	}

	ksort($data);

	if($fillMissing) {
		$data = $this->fillMissing($data);
	}
	return $data;
}