Git Product home page Git Product logo

Comments (4)

Secbone avatar Secbone commented on May 23, 2024

@zhaozhongfeng1990 any more details?

from toad.

zhangyanfirez avatar zhangyanfirez commented on May 23, 2024

我也遇到了这个问题:
\toad\utils\func.py in np_count(arr, value, default)
55
56 def np_count(arr, value, default = None):
---> 57 c = (arr == value).sum()
58
59 if default is not None and c == 0:

AttributeError: 'bool' object has no attribute 'sum'

from toad.

Secbone avatar Secbone commented on May 23, 2024

@zhangyanfirez 有更多的报错信息么?调用哪个方法的时候报错的?怎么调用的?

from toad.

zhangyanfirez avatar zhangyanfirez commented on May 23, 2024

@Secbone 目前已经解决了。问题是使用了pyspark的toPandas()将pyspark的dataframe转换为pandas dataframe后调用了toad.selection.select时报错,原因是(arr == value).sum()中的arr要求是numpy array 。重新使用pandas读取数据后再调用toad.selection.select没有出现问题。

from toad.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.