scrtlabs / catalyst

An Algorithmic Trading Library for Crypto-Assets in Python
http://enigma.co
Apache License 2.0
2.47k stars 721 forks source link

Update pandas version #269

Open OmegaDroid opened 6 years ago

OmegaDroid commented 6 years ago

Dear Catalyst Maintainers,

Before I tell you about my issue, let me describe my environment:

Environment

Now that you know a little about me, let me tell you about the issue I am having:

Description of Issue

I'm trying to install catalyst along with a few other packages that depend on versions of pandas > 0.20.

Specifically I am trying to install tsfresh along with catalyst.

Both tsfresh and catalyst are instalable.

Traceback (most recent call last):
  File "temp.py", line 5, in <module>
    from catalyst.api import symbol, order_target_percent
  File "/home/dan/.pyenv/versions/thumper/lib/python3.6/site-packages/catalyst/__init__.py", line 21, in <module>
    from . import finance
  File "/home/dan/.pyenv/versions/thumper/lib/python3.6/site-packages/catalyst/finance/__init__.py", line 16, in <module>
    from . import execution, trading
  File "/home/dan/.pyenv/versions/thumper/lib/python3.6/site-packages/catalyst/finance/trading.py", line 19, in <module>
    from pandas.tslib import normalize_date
ImportError: cannot import name 'normalize_date'

Here is how you can reproduce this issue on your machine:

Reproduction Steps

  1. pip install catalyst
  2. pip install tsfresh
  3. pip check

What steps have you taken to resolve this already?

...

Anything else?

...

Sincerely, Dan

lenak25 commented 6 years ago

Hi @OmegaDroid,

If you run pip check you have probably saw the following: enigma-catalyst 0.5.3 has requirement pandas<0.20,>=0.19.2

Could you try to use catalyst on a separate virtual environment along with pandas 0.19.2?

In any case, we will see what can be done in order to support a later pandas version.

Thanks for reporting.

Lena

OmegaDroid commented 6 years ago

Hi @lenak25,

Sadly this isn't really possible as we need pandas > 0.20 as part of our handle_data function. We could start a separate process running in a separate env but this isn't really ideal.

Cheers, Dan

OmegaDroid commented 6 years ago

Hi @lenak25 I have been trying to run the tests to see if I could take a look at upping pandas. Running nosetest it seems to hang for a really long time on

test_create_connection_no_inet_pton (test.test_asyncio.test_base_events.BaseEventLoopWithSelectorTests)

Is there anything special i need to do to get the tests running? It may be that it is hanging due to a pandas error.

wassname commented 6 years ago

Here's a start on using pandas 0.22.0. Lots of changes required though, too much for me right now.

rolo commented 5 years ago

Zipline now support Pandas 0.22 in their latest build. https://github.com/quantopian/zipline/pull/2194 / https://github.com/quantopian/zipline/releases/tag/v1.3.0

rmcclaincf commented 5 years ago

Is this on the roadmap anytime soon? I have a large project I want to integrate, and wondering if I should try to downgrade pandas which will be a huge pain, or wait? No pressure, just don't want to deal with that if support is coming soon.

lenak25 commented 5 years ago

@rmcclaincf , we haven't started addressing it so this isn't something that should be expected in the very near future.