-
-
Notifications
You must be signed in to change notification settings - Fork 815
Open
Labels
Description
What is your suggestion?
Include support for type Period. A period represents neither the start or the end of the period, but rather the entire period itself.
Given the following:
import altair as alt
import pandas as pd
df = pd.DataFrame(data={'year':pd.period_range(start=2020, end=2024, freq='Y'), 'values': range(0,5)})
df
If I do:
alt.Chart(df).mark_bar().encode(x='year', y='values')
I receive the following error
TypeError: Object of type Period is not JSON serializable alt.Chart(...)
Have you considered any alternative solutions?
Potential solution (?) for #1365 and #3701 (comment)