GithubHelp home page GithubHelp logo

Comments (3)

wesm avatar wesm commented on July 30, 2024

You identified a weakness (which I was aware of) with the way that date ranges are handled-- not a problem for lower frequency data but here it's a problem. I think it's inherently fixable but I need to think about it. I've been thinking recently about using something like Francesc Alted's carray package to implement an efficient (compressed) tickdata data structure-- since tickdata is fairly compressible I expect that it would work quite well.

from pandas.

wesm avatar wesm commented on July 30, 2024

This ought to be remedied by the datetime64 time in NumPy...once it's arrived. I have some ideas to try to do something about it in the meantime

from pandas.

wesm avatar wesm commented on July 30, 2024

Not sure exactly how but I appear to have fixed this problem in recent work on DateRange. Note that there's a Second offset in datetools with significantly better performance:

In [5]: s
Out[5]: 
2000-01-03 00:00:00    -1.4477377311
2000-01-04 00:00:00    -0.0657188405266
2000-01-05 00:00:00    -0.240092884503
2000-01-06 00:00:00    0.377959314609

In [6]: %time s.asfreq(DateOffset(seconds=1), method='pad')
CPU times: user 4.68 s, sys: 0.08 s, total: 4.76 s
Wall time: 4.78 s

In [7]: %time s.asfreq(datetools.Second(), method='pad')
CPU times: user 0.33 s, sys: 0.01 s, total: 0.34 s
Wall time: 0.35 s

from pandas.

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.