Git Product home page Git Product logo

Comments (2)

tpetricek avatar tpetricek commented on May 31, 2024

Ah, interesting - now that I think of this, it would make sense...

I was going to suggest that this can be easily done just by using Series.fillMissing Direction.Forward, but perhaps that's not quite the case - I suppose you only want to fill values for the keys of the other series/frame, right? (and leave other missing values empty, or even copy them)

But then - would you want the same behavior for inner joins? (if you do not specify Lookup.Exact, it could lookup previous/next values and then drop only those with missing values...)

Another question is, wouldn't you sometimes want to specify lookup behavior separately for both left & right sides? (e.g. if you had historical data and wanted to get gulf Thursday data for western Friday & western Monday data for gulf Sunday data - perhaps not the most reasonable example... but perhaps it might be needed in some cases?)

from deedle.

buybackoff avatar buybackoff commented on May 31, 2024

I suppose you only want to fill values for the keys of the other series/frame, right?

Right, I do not know all needed keys in advance to fill the original series. Outer join with lookup should be much more efficient than fillingMissing, e.g. for ticks I would have to populate every possible tick. FillMissing could only work when the frequency of data is known.

But then - would you want the same behavior for inner joins? (if you do not specify Lookup.Exact, it could lookup previous/next values and then drop only those with missing values...)

I believe inner join is by definition exact - you only take keys when both values are present and no lookups are needed. I would even throw an error if the lookup argument differs from exact in the inner join case.

Another question is, wouldn't you sometimes want to specify lookup behavior separately for both left & right sides?

I could hardly imagine the case when I need different lookup direction on two series. I cannot use Monday data for any calculations with gulf's previous Sunday data because on Sunday the western data as of Monday is not known. In fact, I believe NearestGreater in only 1% of my use cases. In 99% I just repeat different series of sometimes irregular data to align it and do further calculations.

What could be useful is a combination of FillMissing and Lookup. But in a couple of minutes I could come up only with artificial use cases. This will probably be an unneeded complexity.

from deedle.

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.