You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "[...]\venv\Lib\site-packages\datatest\acceptances.py", line 191, in __exit__
raise exc_value
File "<input>", line 2, in <module>
File "[...]\venv\Lib\site-packages\datatest\validation.py", line 285, in __call__
result = requirement_object(data) # <- Apply requirement.
^^^^^^^^^^^^^^^^^^^^^^^^
File "[...]\venv\Lib\site-packages\datatest\requirements.py", line 203, in __call__
result = self.check_data(data)
^^^^^^^^^^^^^^^^^^^^^
File "[...]venv\Lib\site-packages\datatest\requirements.py", line 267, in check_data
data = normalize(data, lazy_evaluation=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "[...]\venv\Lib\site-packages\datatest\_normalize.py", line 159, in normalize
obj = _normalize_lazy(obj)
^^^^^^^^^^^^^^^^^^^^
File "[...]\venv\Lib\site-packages\datatest\_normalize.py", line 93, in _normalize_lazy
return IterItems(obj.iteritems()) # <- EXIT!
^^^^^^^^^^^^^
File "[...]\venv\Lib\site-packages\pandas\core\generic.py", line 6299, in __getattr__
return object.__getattribute__(self, name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Series' object has no attribute 'iteritems'
According to pandas docs, Series.iteritems is deprecated since pandas 2.0, and obj.items should now be used.
It is worth noting that changing obj.iteritems() to obj.items() in line 93 of _normalize.py removes this error and gives the expected result :
datatest.ValidationError: does not satisfy `0` (1 difference): {
('B', 2): Deviation(+2, 0),
}
```
The text was updated successfully, but these errors were encountered:
The following example code using pandas 2.2.2 throws an AttributeError :
The following error is raised :
According to pandas docs,
Series.iteritems
is deprecated since pandas 2.0, andobj.items
should now be used.It is worth noting that changing
obj.iteritems()
toobj.items()
in line 93 of_normalize.py
removes this error and gives the expected result :The text was updated successfully, but these errors were encountered: