Giter Site home page Giter Site logo

Comments (2)

texodus avatar texodus commented on May 27, 2024

Thanks for the report, this is not a bug.

  • "integer" columns cannot represent infinity or nan, in Perspective or otherwise.
  • "float" columns replace NaN, -Infinity and Infinity, with null intentionally - as asserted by our test suite. We made this decision intentionally in the very first Perspective release for two reasons:
    • These values are generally not relevant in the context of data visualization, and their presence among other false-y value makes other operations in the UI more cumbersome (like filters and groups with null).
    • JSON does not support these values, meaning we need to add validation and encoding/decoding anywhere the data may be stringified as JSON, leading to performance and significant complexity cost.

It's possible we could elaborate on support for these values for "float" types only, but discussion around this should go in its own feature request if anyone cares to elaborate on what the real use case for this would be.

from perspective.

kryaksy avatar kryaksy commented on May 27, 2024

Thanks for the prompt response, @texodus .

I understand your points regarding integers. However, for floats, while these values may be irrelevant and possibly undesirable for visualization libraries outside of data grids, there are many scenarios where data grids are more frequently used and where handling these values becomes necessary. In such contexts, there can be significant semantic differences between NaN, +/-Infinity, and null values. I am confident that in my specific situation, acknowledging these distinctions is crucial.

Considering this, I wonder if it's feasible to accurately serialize these values with a method akin to to_json. Would it be suitable to open a feature request for this particular issue?

from perspective.

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.