public function top($num,$offset=0)
    {
        $count = $this->countData();
        $result = array();
        for ($i=$offset;$i<$num+$offset && $i<$count;$i++) {
            array_push($result, $this->rows[$i]);
        }
        return new DataStore($result, $this->metaData);
    }
public function top($num,$offset=0)
    {
        $count = $this->countData();
        $result = array();
        for ($i=$offset;$i<$num+$offset && $i<$count;$i++) {
            array_push($result, $this->rows[$i]);
        }
        return new DataStore($result, $this->metaData);
    }
public function top ( $ num , $ offset = 0 ) { $ count = $ this -> countData ( ) ; $ result = array ( ) ; for ( $ i = $ offset ; $ i < $ num + $ offset && $ i < $ count ; $ i ++ ) { array_push ( $ result , $ this -> rows [ $ i ] ) ; } return new DataStore ( $ result , $ this -> metaData ) ; }
Return top number of rows

It will return top rows starting at specified offset.
If offset is not specified, the default value is 0.

@param integer $num    Number of top row you want to get
@param integer $offset At what index you want to start getting rows

@return DataStore New DataStore containing result
Return top number of rows