GithubHelp home page GithubHelp logo

python fit throws error about prophet HOT 9 CLOSED

facebook avatar facebook commented on April 25, 2024
python fit throws error

from prophet.

Comments (9)

abuccts avatar abuccts commented on April 25, 2024 1

Hi @datafool ,
I met the same problem with you, environment python 2.7 and anaconda 2.2. I solved it by upgrading pandas from version 0.17.1 to 0.19.2.
I think you can upgrade pandas to the newest version by python -m pip install --upgrade pandas and the original code should work.

from prophet.

iampawansingh avatar iampawansingh commented on April 25, 2024 1

Hi @abuccts thanks! yes upgrade to newest version works fine. I think requirement of latest version of pandas should go in setup.py so that pandas is upgraded automatically, rather than we facing the problem and then updating it

from prophet.

abuccts avatar abuccts commented on April 25, 2024

I agree with you. Either changing pandas.Series.apply to pandas.Series.dt.days or adding a minimum pandas version will fix this issue.

I can make a PR for this. But which solution will be better?

from prophet.

iampawansingh avatar iampawansingh commented on April 25, 2024

I will go with pandas.Series.dt.days, as this is pandas inbuilt so all the heavy lifting will happen at the same place, unlike apply, and as per my understanding apply would be slower than internal pandas functions

from prophet.

abuccts avatar abuccts commented on April 25, 2024

That's right. pandas.Series.dt.days is more efficient, but is unavailable in some old versions of pandas, I have no idea about the minimum version.

from prophet.

iampawansingh avatar iampawansingh commented on April 25, 2024

I checked the pandas documentation back till 0.15, pandas.Series.dt.days is available from 0.16 onward. Also, 0.16 came back in June 2015, chances are everyone might have shifted to a higher version.

from prophet.

seanjtaylor avatar seanjtaylor commented on April 25, 2024

Thanks for diagnosing and fixing this! Will merge the PR soon.

from prophet.

raymondmars avatar raymondmars commented on April 25, 2024

Nice ! I met same problem today.

from prophet.

deehzee avatar deehzee commented on April 25, 2024

The problem is still there. Using pandas 0.20.1 (also tested on pandas 0.19.2) and fbprphet 0.1.1.

from prophet.

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.