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

pip repo doesn't have pandas np fix and exclusively negative spreads are not visualized properly #287

Open
danialramzan opened this issue May 6, 2024 · 0 comments

Comments

@danialramzan
Copy link

danialramzan commented May 6, 2024

I am reporting two issues:

  1. The cufflinks module on pip does not have the fix accounting for pandas deprecating pandas.np. There are two possible solutions for this.

    a) Fix it yourself: open the pip cufflinks module in your environment folder and replace all occurrences of pandas.np with np, after importing numpy as np at the top of the file in plotlytools.py.

    b) Replace the plotlytools.py file in your cufflinks folder with the one in this github repo, which has the required fixes.

  2. Spreads are not labelled consistently if the first column has consistently greater values than the second column. If this is the case, both the graph labels and values for yaxis2 are incoherent, and the spread approximates a right triangle shape. The solution for this appears to be changing the order of your columns to have the largest one first.

image

Data starting from 2018-01-12 is visualized normally because there exists at least one data point for which the first element in the ordered pair of columns is greater than the second element:

image

For data starting from 2018-01-13, when this is no longer true the issue manifests itself:

image

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

No branches or pull requests

1 participant