Spaces:
Runtime error
Runtime error
Update app3.py
Browse files
app3.py
CHANGED
@@ -22,7 +22,7 @@ df2['timestamp']=pd.to_datetime(df2['timestamp'])
|
|
22 |
df2=pd.melt(df2, id_vars=['president', 'subgroup', 'timestamp'], value_vars=['approve','disapprove']).rename(columns={'variable':'choice', 'value':'rate'})
|
23 |
|
24 |
# Enable Panel extensions
|
25 |
-
pn.extension()
|
26 |
|
27 |
# Define a function to create and return a plot
|
28 |
def create_plot(subgroup='All polls', date_range=[df2['timestamp'].min(), df2['timestamp'].max()], moving_av_window=1):
|
|
|
22 |
df2=pd.melt(df2, id_vars=['president', 'subgroup', 'timestamp'], value_vars=['approve','disapprove']).rename(columns={'variable':'choice', 'value':'rate'})
|
23 |
|
24 |
# Enable Panel extensions
|
25 |
+
pn.extension('vega')
|
26 |
|
27 |
# Define a function to create and return a plot
|
28 |
def create_plot(subgroup='All polls', date_range=[df2['timestamp'].min(), df2['timestamp'].max()], moving_av_window=1):
|