【问题标题】:Is there any easy way to determine two Table Objects Equivalent in DolphinDB是否有任何简单的方法来确定在 DolphinDB 中等效的两个表对象
【发布时间】:2019-03-17 16:12:42
【问题描述】:

我使用了这样的方法:

def compareTables(tb1,tb2){
    if(tb1.rows() != tb2.rows()) return false
    if(tb1.cols() != tb2.cols()) return false
    for(colname in tb1.columnNames()){
        for(row in 0:tb1.rows()){
            if(tb1[colname][row] != tb2[colname][row]) return false
        }
    }    
    return true
}

Buuuuuut.....我真的不喜欢它。它是如此的低效和繁琐。 有没有更优雅、更高效的方式来实现?

【问题讨论】:

    标签: dolphindb


    【解决方案1】:

    每个(eqObj, tb1.values(), tb2.values(), 6).all()

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-02-16
      • 2011-03-29
      • 2022-12-04
      相关资源
      最近更新 更多