original_string: public function make($index, $resultIndices)
      {
          $keyMetadata = $this->getDefaultMetadata();
  
          if (empty($resultIndices)) {
              // for numeric data, if there's no index (and thus only 1 site & period in the query),
              // we want to display every queried metric name
              if (empty($index)
                  && $this->isNumericDataType()
              ) {
                  $index = $this->defaultRow;
              }
  
              $dataTable = $this->createDataTable($index, $keyMetadata);
          } else {
              $dataTable = $this->createDataTableMapFromIndex($index, $resultIndices, $keyMetadata);
          }
  
          return $dataTable;
      }
code: public function make($index, $resultIndices)
      {
          $keyMetadata = $this->getDefaultMetadata();
  
          if (empty($resultIndices)) {
              // for numeric data, if there's no index (and thus only 1 site & period in the query),
              // we want to display every queried metric name
              if (empty($index)
                  && $this->isNumericDataType()
              ) {
                  $index = $this->defaultRow;
              }
  
              $dataTable = $this->createDataTable($index, $keyMetadata);
          } else {
              $dataTable = $this->createDataTableMapFromIndex($index, $resultIndices, $keyMetadata);
          }
  
          return $dataTable;
      }
code_tokens: public function make ( $ index , $ resultIndices ) { $ keyMetadata = $ this -> getDefaultMetadata ( ) ; if ( empty ( $ resultIndices ) ) { // for numeric data, if there's no index (and thus only 1 site & period in the query), // we want to display every queried metric name if ( empty ( $ index ) && $ this -> isNumericDataType ( ) ) { $ index = $ this -> defaultRow ; } $ dataTable = $ this -> createDataTable ( $ index , $ keyMetadata ) ; } else { $ dataTable = $ this -> createDataTableMapFromIndex ( $ index , $ resultIndices , $ keyMetadata ) ; } return $ dataTable ; }
docstring: Creates a DataTable|Set instance using an index of
  archive data.
  
  @param array $index @see DataCollection
  @param array $resultIndices an array mapping metadata names with pretty metadata
  labels.
  @return DataTable|DataTable\Map
docstring_tokens: Creates a DataTable|Set instance using an index of archive data .