当前位置: 首页>>代码示例>>Python>>正文


Python RUtil.run_with_table方法代码示例

本文整理汇总了Python中RUtil.run_with_table方法的典型用法代码示例。如果您正苦于以下问题:Python RUtil.run_with_table方法的具体用法?Python RUtil.run_with_table怎么用?Python RUtil.run_with_table使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RUtil的用法示例。


在下文中一共展示了RUtil.run_with_table方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_response_content

# 需要导入模块: import RUtil [as 别名]
# 或者: from RUtil import run_with_table [as 别名]
def get_response_content(fs):
    # get the r table
    rtable = RUtil.RTable(fs.table.splitlines())
    header_row = rtable.headers
    data_rows = rtable.data
    Carbone.validate_headers(header_row)
    # check requested variable names as column headers
    if fs.var_a not in header_row:
        raise ValueError('the first variable name is not column header')
    if fs.var_b not in header_row:
        raise ValueError('the second variable name is not column header')
    return RUtil.run_with_table(fs.table, fs, get_script_content)
开发者ID:argriffing,项目名称:xgcode,代码行数:14,代码来源:20100921a.py

示例2: get_response_content

# 需要导入模块: import RUtil [as 别名]
# 或者: from RUtil import run_with_table [as 别名]
def get_response_content(fs):
    # get the r table
    rtable = RUtil.RTable(fs.table.splitlines())
    header_row = rtable.headers
    data_rows = rtable.data
    Carbone.validate_headers(header_row)
    # check requested variable names as column headers
    if fs.variable not in header_row:
        msg = 'the variable name was not found as a column in the data table'
        raise ValueError(msg)
    if fs.factor not in header_row:
        msg = 'the factor name was not found as a column in the data table'
        raise ValueError(msg)
    return RUtil.run_with_table(fs.table, fs, get_script_content)
开发者ID:argriffing,项目名称:xgcode,代码行数:16,代码来源:20100920b.py

示例3: get_response_content

# 需要导入模块: import RUtil [as 别名]
# 或者: from RUtil import run_with_table [as 别名]
def get_response_content(fs):
    # get the independent variable names
    indep = Util.get_stripped_lines(fs.independent.splitlines())
    dep = fs.dependent
    # get the r table
    rtable = RUtil.RTable(fs.table.splitlines())
    header_row = rtable.headers
    data_rows = rtable.data
    Carbone.validate_headers(header_row)
    # check requested variable names as column headers
    bad_indep_names = set(indep) - set(header_row)
    if bad_indep_names:
        raise ValueError(
            "these requested independent variable names "
            "were not found as columns "
            "in the data table: " + str(bad_indep_names)
        )
    if dep not in header_row:
        raise ValueError("the dependent variable name " "was not found as a column in the data table")
    return RUtil.run_with_table(fs.table, (indep, dep), get_script_content)
开发者ID:argriffing,项目名称:xgcode,代码行数:22,代码来源:20100920a.py


注:本文中的RUtil.run_with_table方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。