dimod icon indicating copy to clipboard operation
dimod copied to clipboard

add pandas as dependency

Open JordanAWS opened this issue 3 years ago • 2 comments

https://github.com/dwavesystems/dimod/blob/003253f5a28419ed7664042bb7dd3644c78832c0/dimod/sampleset.py#L1765

In this function you implicitly assume that a user has pandas installed, but it's not currently a dependency in requirements.txt
Would be great to add.

JordanAWS avatar Mar 03 '22 22:03 JordanAWS

Hi @JordanAWS , we deliberately do not have a direct dependency on pandas since it is a rather weighty library and we only include a few methods, like this one, for convenience. We use a similar pattern for NetworkX.

We do include it in our tests/requirements.txt for testing.

I do think we should raise a better error message and update the docstring to indicate this.

arcondello avatar Mar 03 '22 22:03 arcondello

Good plan, thanks for the super quick response!

JordanAWS avatar Mar 03 '22 22:03 JordanAWS