예제 #1
0
파일: expr.py 프로젝트: ZivkoKrstic/h2o-3
 def fill(self, rows=10):
   assert self._id is not None
   if self._data is not None:
     if rows <= len(self):
       return
   res = H2OConnection.get_json("Frames/"+quote(self._id), row_count=rows)["frames"][0]
   self._l     = rows
   self._nrows = res["rows"]
   self._ncols = res["total_column_count"]
   self._names = [c["label"] for c in res["columns"]]
   self._types = dict(zip(self._names,[c["type"] for c in res["columns"]]))
   self._fill_data(res)
예제 #2
0
파일: expr.py 프로젝트: tempbottle/h2o-3
 def fill(self, rows=10):
   assert self._id is not None
   if self._data is not None:
     if rows <= len(self):
       return
   res = H2OConnection.get_json("Frames/"+quote(self._id), row_count=rows)["frames"][0]
   self._l     = rows
   self._nrows = res["rows"]
   self._ncols = res["total_column_count"]
   self._names = [c["label"] for c in res["columns"]]
   self._types = dict(zip(self._names,[c["type"] for c in res["columns"]]))
   self._fill_data(res)
예제 #3
0
파일: expr.py 프로젝트: ZivkoKrstic/h2o-3
  def rapids(expr):
    """Execute a Rapids expression.

    Parameters
    ----------
    expr : str
      The rapids expression (ascii string).

    Returns
    -------
      The JSON response (as a python dictionary) of the Rapids execution
    """
    return H2OConnection.post_json("Rapids", ast=quote(expr), _rest_version=99)
예제 #4
0
파일: expr.py 프로젝트: tempbottle/h2o-3
  def rapids(expr):
    """Execute a Rapids expression.

    Parameters
    ----------
    expr : str
      The rapids expression (ascii string).

    Returns
    -------
      The JSON response (as a python dictionary) of the Rapids execution
    """
    return H2OConnection.post_json("Rapids", ast=quote(expr),session_id=H2OConnection.session_id(), _rest_version=99)