コード例 #1
0
    def get_status(self, scenario_id):
        """Get status of scenario by scenario_id

        :param str scenario_id: the scenario id
        :return: (*pandas.DataFrame*) -- results as a data frame.
        """
        query = self.select_where("id")
        self.cur.execute(query, (scenario_id, ))
        result = self.cur.fetchmany()
        return to_data_frame(result)
コード例 #2
0
    def get_scenario_by_id(self, scenario_id):
        """Get entry from scenario list by id

        :param str scenario_id: scenario id
        :return: (*pandas.DataFrame*) -- results as a data frame.
        """
        query = self.select_where("id")
        self.cur.execute(query, (scenario_id, ))
        result = self.cur.fetchmany()
        return to_data_frame(result)
コード例 #3
0
    def get_execute_table(self, limit=None):
        """Return the execute table as a data frame

        :return: (*pandas.DataFrame*) -- execute list as a data frame.
        """
        query = self.select_all()
        self.cur.execute(query)
        if limit is None:
            result = self.cur.fetchall()
        else:
            result = self.cur.fetchmany(limit)
        return to_data_frame(result)
コード例 #4
0
    def get_scenario_table(self, limit=None):
        """Returns scenario table from database

        :return: (*pandas.DataFrame*) -- scenario list as a data frame.
        """
        query = self.select_all()
        self.cur.execute(query)
        if limit is None:
            result = self.cur.fetchall()
        else:
            result = self.cur.fetchmany(limit)
        return to_data_frame(result)