Last active
October 9, 2015 14:49
-
-
Save euri10/43e95faefd57889465d5 to your computer and use it in GitHub Desktop.
basic bokeh Bar chart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
from bokeh.charts import Bar | |
from bokeh.plotting import show | |
from bokeh.io import output_notebook | |
output_notebook() | |
campaign = pd.DataFrame({'Delivery date': ['9/11/2013', '9/11/2013', '9/18/2013', '10/2/2013', '10/8/2013', '10/15/2013', '10/17/2013', | |
'10/22/2013', '11/8/2013'], | |
'Google Tracking Code': ['msag1413e ', 'mss1113e ', 'mss1813e ', 'mso213e ', 'mso813e2 ', 'mso1413e ', 'mssigns13 ', | |
'sepp102213 ', 'msn813e1 '], | |
'Visits': [2777, 3361, 3140, 3111, 2306, 2097, 3135, 1925, 1839], | |
'Revenue': ['3776', '9606.5', '19269.28', '47121.6', '13271.43', '28417.8', '1285.47', '694.36', '4572'], | |
'Transactions': ['43', '40', '68', '157', '47', '89', '12', '8', '16'] | |
}, index=['msag1413e ', 'mss1113e ', 'mss1813e ', 'mso213e ', 'mso813e2 ', 'mso1413e ', 'mssigns13 ', | |
'sepp102213 ', 'msn813e1 ']) | |
bar_columns=campaign[["Visits"]] | |
print bar_columns | |
bar = Bar(bar_columns) | |
show(bar) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment