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

.evaluate() fails with current pandas #6

Closed
thvitt opened this issue Oct 6, 2020 · 1 comment
Closed

.evaluate() fails with current pandas #6

thvitt opened this issue Oct 6, 2020 · 1 comment
Assignees

Comments

@thvitt
Copy link

thvitt commented Oct 6, 2020

    distances.evaluate()
  File "/tmp/pydelta/delta/deltas.py", line 787, in evaluate
    result["Simple Score"] = self.simple_score()
  File "/tmp/pydelta/delta/deltas.py", line 772, in simple_score
    in_group_df, out_group_df = self.z_scores().partition()
  File "/tmp/pydelta/delta/deltas.py", line 731, in z_scores
    return DistanceMatrix((self - deltas.mean()) / deltas.std(),
  File "/tmp/pydelta/.venv/lib/python3.8/site-packages/pandas/core/ops/__init__.py", line 660, in f
    new_data = dispatch_to_series(self, other, op)
  File "/tmp/pydelta/.venv/lib/python3.8/site-packages/pandas/core/ops/__init__.py", line 266, in dispatch_to_series
    return type(left)(bm)
  File "/tmp/pydelta/delta/deltas.py", line 630, in __init__
    self.metadata = Metadata(metadata, **kwargs)
  File "/tmp/pydelta/delta/util.py", line 31, in __init__
    self.update(*args, **kwargs)
  File "/tmp/pydelta/delta/util.py", line 84, in update
    self._update_from(arg)
  File "/tmp/pydelta/delta/util.py", line 53, in _update_from
    self.__dict__.update(d)
TypeError: 'NoneType' object is not iterable

works for pandas < 0.25

@christofs
Copy link

I can confirm that this workaround, i.e. downgrading pandas e.g. to 0.25.3, solves the issue.

thvitt added a commit that referenced this issue Oct 10, 2020
@thvitt thvitt closed this as completed in d022f42 Oct 10, 2020
thvitt added a commit that referenced this issue Oct 10, 2020
This includes the warning from #6, although the underlying task of
refactoring the inheritance stuff still needs to be tackled (#7).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants