From fd72c8833eb559d1825f8bfe0c92a08064773099 Mon Sep 17 00:00:00 2001 From: Jon Mease Date: Sun, 11 Aug 2024 17:09:25 -0400 Subject: [PATCH] Don't expect pandas to be imported under altair --- .../tests/altair_mocks/bar/diverging_stacked/mock.py | 3 ++- .../tests/altair_mocks/casestudy/falkensee/mock.py | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/python/vegafusion/tests/altair_mocks/bar/diverging_stacked/mock.py b/python/vegafusion/tests/altair_mocks/bar/diverging_stacked/mock.py index 8fbb61bd5..7e1bd976f 100644 --- a/python/vegafusion/tests/altair_mocks/bar/diverging_stacked/mock.py +++ b/python/vegafusion/tests/altair_mocks/bar/diverging_stacked/mock.py @@ -1,8 +1,9 @@ # https://altair-viz.github.io/gallery/diverging_stacked_bar_chart.html import altair as alt +import pandas as pd -source = alt.pd.DataFrame([ +source = pd.DataFrame([ { "question": "Question 1", "type": "Strongly disagree", diff --git a/python/vegafusion/tests/altair_mocks/casestudy/falkensee/mock.py b/python/vegafusion/tests/altair_mocks/casestudy/falkensee/mock.py index 13c727037..1dc85856e 100644 --- a/python/vegafusion/tests/altair_mocks/casestudy/falkensee/mock.py +++ b/python/vegafusion/tests/altair_mocks/casestudy/falkensee/mock.py @@ -1,6 +1,7 @@ # https://altair-viz.github.io/gallery/falkensee.html import altair as alt +import pandas as pd source = [ {"year": "1875", "population": 1309}, @@ -55,8 +56,8 @@ }] -source = alt.pd.DataFrame(source) -source2 = alt.pd.DataFrame(source2) +source = pd.DataFrame(source) +source2 = pd.DataFrame(source2) line = alt.Chart(source).mark_line(color='#333').encode(