import pandas as pd
import altair as alt
df = pd.DataFrame({'a':[1,2], 'b':[4,5]})
alt.Chart(df).mark_line().encode(x='a', y='c').to_json()
✅ On Altair 5.3.0, I get
ValueError: Unable to determine data type for the field "c"; verify that the field name is not misspelled. If you are referencing a field from a transform, also confirm that the data type is specified correctly.
🔴 On Altair 5.4.0, I get
ValueError: c encoding field is specified without a type; the type cannot be automatically inferred because the data is not specified as a pandas.DataFrame.
What would you like to happen instead?
Keep the 5.3.0 error
This one's my fault from the Narwhalification, sorry about that - submitting a fix now
What happened?
I ran
✅ On Altair 5.3.0, I get
🔴 On Altair 5.4.0, I get
What would you like to happen instead?
Keep the 5.3.0 error
This one's my fault from the Narwhalification, sorry about that - submitting a fix now
Which version of Altair are you using?
5.4.0