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
Using .to_dict() on an altair 4.2.0 object I get the following FutureWarning with pandas 1.5.0:
.tox/py39-unit/lib/python3.9/site-packages/altair/vegalite/v4/api.py:384: in to_dict
dct = super(TopLevelMixin, copy).to_dict(*args, **kwargs)
.tox/py39-unit/lib/python3.9/site-packages/altair/utils/schemapi.py:326: in to_dict
result = _todict(
.tox/py39-unit/lib/python3.9/site-packages/altair/utils/schemapi.py:60: in _todict
return {
.tox/py39-unit/lib/python3.9/site-packages/altair/utils/schemapi.py:61: in <dictcomp>
k: _todict(v, validate, context)
.tox/py39-unit/lib/python3.9/site-packages/altair/utils/schemapi.py:58: in _todict
return [_todict(v, validate, context) for v in obj]
.tox/py39-unit/lib/python3.9/site-packages/altair/utils/schemapi.py:58: in <listcomp>
return [_todict(v, validate, context) for v in obj]
.tox/py39-unit/lib/python3.9/site-packages/altair/utils/schemapi.py:56: in _todict
return obj.to_dict(validate=validate, context=context)
.tox/py39-unit/lib/python3.9/site-packages/altair/vegalite/v4/api.py:2020: in to_dict
return super().to_dict(*args, **kwargs)
.tox/py39-unit/lib/python3.9/site-packages/altair/vegalite/v4/api.py:374: in to_dict
copy.data = _prepare_data(original_data, context)
.tox/py39-unit/lib/python3.9/site-packages/altair/vegalite/v4/api.py:89: in _prepare_data
data = _pipe(data, data_transformers.get())
.tox/py39-unit/lib/python3.9/site-packages/toolz/functoolz.py:628: in pipe
data = func(data)
.tox/py39-unit/lib/python3.9/site-packages/toolz/functoolz.py:304: in __call__
return self._partial(*args, **kwargs)
.tox/py39-unit/lib/python3.9/site-packages/altair/vegalite/data.py:19: in default_data_transformer
return curried.pipe(data, limit_rows(max_rows=max_rows), to_values)
.tox/py39-unit/lib/python3.9/site-packages/toolz/functoolz.py:628: in pipe
data = func(data)
.tox/py39-unit/lib/python3.9/site-packages/toolz/functoolz.py:304: in __call__
return self._partial(*args, **kwargs)
.tox/py39-unit/lib/python3.9/site-packages/altair/utils/data.py:149: in to_values
data = sanitize_dataframe(data)
.tox/py39-unit/lib/python3.9/site-packages/altair/utils/core.py:317: in sanitize_dataframe
for col_name, dtype in df.dtypes.iteritems():
.tox/py39-unit/lib/python3.9/site-packages/pandas/core/series.py:1845: in iteritems
warnings.warn(
E FutureWarning: iteritems is deprecated and will be removed in a future version. Use .items instead.
Using
.to_dict()
on analtair
4.2.0 object I get the followingFutureWarning
withpandas
1.5.0:I believe it's just a matter of using
.items()
rather than.iteritems()
..items()
was introduced for Python 3 only in pandas-dev/pandas@16dbeab and then for Python 2 in pandas-dev/pandas@3b02e73.Since
altair
requires Python >= 3.7 this should not conflict with the current requirements ofpandas>=0.18
.The text was updated successfully, but these errors were encountered: