Closed mattijn closed 1 day ago
I currently get this error when trying to import altair:
ImportError: cannot import name 'is_into_dataframe' from 'narwhals.dependencies'
This part is not safe at the moment: https://github.com/vega/altair/blob/a0c091eca897e1b9eaa6bb70d8ae8dc1deff9e60/altair/utils/_vegafusion_data.py#L8
The function is_into_dataframe is introduced in narwhals v1.13.1, but our demand is: https://github.com/vega/altair/blob/a0c091eca897e1b9eaa6bb70d8ae8dc1deff9e60/pyproject.toml#L23
is_into_dataframe
Btw, should this not be referenced by making use of the stable v1 of narwhals?
import narwhals.stable.v1 as nw ... return isinstance(data, DataFrameLike) or nw.dependencies.is_into_dataframe(data)
I notice elsewhere we mixed the stable.v1 with just-import-direct approach: https://github.com/vega/altair/blob/a0c091eca897e1b9eaa6bb70d8ae8dc1deff9e60/altair/utils/core.py#L18-L20
stable.v1
Probably best is to update the pyproject.toml file.
pyproject.toml
main
What happened?
I currently get this error when trying to import altair:
This part is not safe at the moment: https://github.com/vega/altair/blob/a0c091eca897e1b9eaa6bb70d8ae8dc1deff9e60/altair/utils/_vegafusion_data.py#L8
The function
is_into_dataframe
is introduced in narwhals v1.13.1, but our demand is: https://github.com/vega/altair/blob/a0c091eca897e1b9eaa6bb70d8ae8dc1deff9e60/pyproject.toml#L23Btw, should this not be referenced by making use of the stable v1 of narwhals?
I notice elsewhere we mixed the
stable.v1
with just-import-direct approach: https://github.com/vega/altair/blob/a0c091eca897e1b9eaa6bb70d8ae8dc1deff9e60/altair/utils/core.py#L18-L20What would you like to happen instead?
Probably best is to update the
pyproject.toml
file.Which version of Altair are you using?
main