Giter Club home page Giter Club logo

Comments (3)

JS00N avatar JS00N commented on June 4, 2024 1

This seems like pretty significant bug as it prevents pyfinance from being imported.

FreqGroup and get_freq_code seem to be used exclusively in the get_anlz_factor function. As noted by garciapd, FreqGroup has been moved to pandas._libs.tslibs.dtypes. I have searched the source code of pandas 1.1.2 and get_freq_code no longer exists with the functionality implemented in pyfinance. Attached is a script that defines a function get_freq_code which has the proper functionality. I have tested it successfully on all the test cases in the get_anlz_factor docstring. I did have to modify the expected exception in get_anlz_factor (line 56).

Edit: A pull request has been created.

from pyfinance.

vilasfe avatar vilasfe commented on June 4, 2024

I did a little digging and it looks like pandas changed the API for FreqGroup between 1.0.x and 1.1.x. So it is a relatively recent change. There could probably be a PR based on something like

import pandas as pd
if pd._version.get_versions()['version'].startswith('0.') or pd._version.get_versions()['version'].startswith('1.0'):

from pandas._libs.tslibs.frequencies import FreqGroup, get_freq_code

else:

from pandas._libs.tslibs.dtypes import FreqGroup
`

NOTE: I have not tested the above code, it is just speculation at this point.

from pyfinance.

bsolomon1124 avatar bsolomon1124 commented on June 4, 2024

Closed via ad9ab64.

from pyfinance.

Related Issues (18)

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.