Giter Club home page Giter Club logo

Comments (8)

johnmyleswhite avatar johnmyleswhite commented on June 11, 2024

In c8e1653, I implemented the semantics proposed above. If people are happy with that, this should be done.

from dataarrays.jl.

johnmyleswhite avatar johnmyleswhite commented on June 11, 2024

Thoughts on this, @simonster?

from dataarrays.jl.

simonster avatar simonster commented on June 11, 2024

This seems right given that unique has isequal semantics. I wonder whether unique(da; skipna=true) would be more discoverable than levels, but then we'd have to return a DataArray and not an Array for type stability since we don't get type inference for kwargs.

from dataarrays.jl.

johnmyleswhite avatar johnmyleswhite commented on June 11, 2024

I like that idea, although the absence of type specialization is frustrating.

from dataarrays.jl.

HarlanH avatar HarlanH commented on June 11, 2024

I find it problematic that unique(pda) gives all levels, even those that don't actually exist in the array. This is a problem when using unique on a sub-DataFrame with PDA columns. I currently have to work around it by converting to DataArray before calling unique.

from dataarrays.jl.

nalimilan avatar nalimilan commented on June 11, 2024

Agreed. Even for levels, it is often practical to automatically drop those that do not appear in a subset (though that's yet another issue).

from dataarrays.jl.

HarlanH avatar HarlanH commented on June 11, 2024

I definitely think that levels should just return the pool, as it
currently does (and R does) but that unique should actually go through
the effort of checking. At some level, levels should be the domain of the
array. (See a bunch of very old discussion about metadata that could be
associated with columns/DataArrays, somewhere in the DataFrames issue
backlog...)

On Thu, Jan 2, 2014 at 4:56 PM, Milan Bouchet-Valat <
[email protected]> wrote:

Agreed. Even for levels, it is often practical to automatically drop
those that do not appear in a subset (though that's yet another issue).


Reply to this email directly or view it on GitHubhttps://github.com//issues/29#issuecomment-31488294
.

from dataarrays.jl.

nalimilan avatar nalimilan commented on June 11, 2024

Yeah, this is how it works in R and that makes sense.

from dataarrays.jl.

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.