Giter Site home page Giter Site logo

ENH: filter with slicing about databroker HOT 5 CLOSED

bluesky avatar bluesky commented on August 23, 2024
ENH: filter with slicing

from databroker.

Comments (5)

sbillinge avatar sbillinge commented on August 23, 2024

I also want this behavior, but I also want db[-1] to return the latest dataset regardless of filter settings. In other words, I would like the fact that the slicing is being done on filtered data to be explicit to the user. I

I see big problems otherwise, where some filter is set and users are not getting data that they are expecting and going nutso.

from databroker.

danielballan avatar danielballan commented on August 23, 2024

I see big problems otherwise, where some filter is set and users are not getting data that they are expecting and going nutso.

We saw the same problem. Filters do not affect slicing, and in order to avoid said "nutso" feeling, it is impossible to make them. Can't have cake and eat it too in this case.

from databroker.

danielballan avatar danielballan commented on August 23, 2024

P.S. Of course, can always do:

db.add_filter(bt_piLast='Billinge')
db()[-1]

from databroker.

CJ-Wright avatar CJ-Wright commented on August 23, 2024

Is it possible to get back all the records as a generator? That way we don't look at everything at once.

from databroker.

danielballan avatar danielballan commented on August 23, 2024

I realized no one answer your last question here. It is not currently possible using the public API, but a separate query method could be added. We chose to be non-lazy here to make the common case (fetching a normal number of headers) more accessible. A compromise that shows the difficulty of building a library and a "user friendly" CLI into the same package.

from databroker.

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.