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

date() / monthdate() breaks on Pandas v2.0 #59

Open
vreima opened this issue Jun 2, 2023 · 0 comments
Open

date() / monthdate() breaks on Pandas v2.0 #59

vreima opened this issue Jun 2, 2023 · 0 comments

Comments

@vreima
Copy link

vreima commented Jun 2, 2023

import pandas as pd

source = pd.DataFrame({"A": [1,2,3,4], "B": pd.date_range("2023-06-1", periods=4, freq="D")})

from altair_transform import extract_data

# Works:
data = extract_data(alt.Chart(source).encode(x="A:Q", y="B:Q"))

# AttributeError: module 'pandas' has no attribute 'Int64Index'
data = extract_data(alt.Chart(source).encode(x="A:Q", y="date(B):Q"))

pd.Int64Index was removed in Pandas v2.0 (https://pandas.pydata.org/pandas-docs/version/1.5/reference/api/pandas.Int64Index.html) in favor of pd.NumericIndex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant