zoukankan      html  css  js  c++  java
  • Tushare基础调用及处理

    创建索引:

    db.daily.createIndex({code:1,date:1,'index':1})

    mongodb查看表有几列:

    map = function() {
    for (var key in this) {
    emit(key, {count : 1});
    }};
    
    
    reduce = function(key, emits) {
    total = 0;
    for (var i in emits) {
    total += emits[i].count;
    }
    return {"count" : total};
    }
    
    
    db.runCommand({"mapreduce" : "表名", "map" : map, "reduce" : reduce,"out":"result"})
    
    
    db.result.find()

     

    错误:UserWarning: Attempting to set identical left==right results in singular transformations; automatically expanding. left=0.0, right=0.0   'left=%s, right=%s') % (left, right))

    是因为参数过大,数据不够

  • 相关阅读:
    原生js面试题
    ZJOI2017day2退役战
    uoj6
    uoj5
    uoj2
    uoj1
    论逗逼的自我修养之ZJOI2017Day1
    noip2016滚粗记
    统计损失
    珍珠项链
  • 原文地址:https://www.cnblogs.com/2186009311CFF/p/11884367.html
Copyright © 2011-2022 走看看