账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    pandas 求每列的唯一值个数
    64
    0

    为计算数据框每一列的唯一值的个数我写了一个函数:

    def unqiue_element(x):
        a=len(np.unqiue(x))
        return a
    print "the number of unique items in each column",train.apply(unqiue_element)
    

    出现错误
    AttributeError: ("'module' object has no attribute 'unqiue'", u'occurred at index PatientId')
    不知道怎么解决?我的写法有什么问题?

    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • 纸条线 普通会员 1楼
      { "error": "Failed to generate content." }
    更多回答
    网站公告
      当前标签《pc_index_zhifou_gg》调用的数据库出错了!
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部