GithubHelp home page GithubHelp logo

ENH: Drop Pandas as dependency about rocketry HOT 4 CLOSED

miksus avatar miksus commented on June 27, 2024 3
ENH: Drop Pandas as dependency

from rocketry.

Comments (4)

Miksus avatar Miksus commented on June 27, 2024 1

Working on this and making some great progress. This was easier than I thought and managed to replicate timedelta parsing quite fine (should not break anything unless you have used really odd strings).

I think we could replace pd.Timestamp with python-dateutil which has quite OK datetime parser.

from rocketry.

Miksus avatar Miksus commented on June 27, 2024

It seems three things need to be somewhat replaced that are currently used from Pandas:

  • pd.Interval (used in redengine/core/time/base.py & redengine/core/time/interval.py)
  • pd.Timedelta (used redengine/session.py, redengine/core/task.py, multiple places in redengine/time)
  • pd.Timestamp (used in redengine/pybox/query/base.py, redengine/core/time/base.py & redengine/core/time/interval.py)

Interval could be replaced with a simple custom class or so. I think it is used only to check if a time is inside the interval (after or equal to left, before or equal to right). Seems Pandas' solution is in Cython but I don't think this is a performance matter.

Timedelta is probably the hardest bit. We need a better timedelta parser than provided by most libraries. Possibly creating one own to make it work exactly right. Pandas' solution is in Cython but it probably complicates building if it is directly copied. Seems the parsing is possibly here pandas/_libs/tslibs/timedeltas.pyx

Timestamp There might be some places where a string can be passed and parsed. Perhaps dateutil could be an option.

from rocketry.

gaby avatar gaby commented on June 27, 2024

πŸ‘πŸ» for removing both Pandas and Numpy. These dependencies dont play well with Alpine and require compiling them to use them.

from rocketry.

gaby avatar gaby commented on June 27, 2024

Great to hear!

from rocketry.

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.