Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional fix for missing pandas.Panel #887

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

enricodetoma
Copy link
Contributor

I made an additional fix to manage the case of missing Panel in new pandas versions.
In fact I discovered that in few cases (e.g. library.delete(symbol)), PandasPanelStore static method can_write_type was still called.
With this commit, PandasPanelStore is not even registered as storage class if Panel is missing from pandas.

@shashank88
Copy link
Contributor

@enricodetoma you need to rebase off the latest master after pinning pandas and numpy

@enricodetoma
Copy link
Contributor Author

@shashank88 I rebased off the latest master, but I'm not sure what you mean about pinning pandas and numpy.
This pull request completes my previous pull request #881 which was meant to allow to use Arctic with recent pandas versions, though without Panel support (but then without the need to pin it to a specific version, I guess).

@enricodetoma
Copy link
Contributor Author

Actually I'm already using Arctic successfully with pandas 1.2.3 with this change, without Panel support

@crazy25000
Copy link

Actually I'm already using Arctic successfully with pandas 1.2.3 with this change, without Panel support

Same here, using it with latest Pandas. I don't use panels explicitly, just using tick store. Chunk store too slow to use.

@FranciscoPombal FranciscoPombal mentioned this pull request Jan 29, 2022
@samuelrohr
Copy link

Any update on this review?

Copy link
Contributor

@dunckerr dunckerr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Enrico - we haven’t removed Panel support because we are still supporting old versions of Pandas. Am I correct that you’re forking arctic repo and removing Panel support? We are always interested to hear about any improvements to the arctic codebase.
Thanks
Duncan

@enricodetoma
Copy link
Contributor Author

Hi Duncan, I'm simply skipping importing Panel if it doesn't exist:

try:
    from pandas import Panel
    register_versioned_storage(PandasPanelStore)
except ImportError:
    pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants