# import interesting packages
import os, sys
import pytz
import numpy as np
import pandas as pd
from datetime import timedelta, datetime
print(pd.__version__)
print(sys.version)
## GLUE
import glue
from glue import qglue
print(glue.__version__)
import seaborn as sns
iris_df = sns.load_dataset('iris')
iris_df.head(3)
# adding some dates to raw iris dataset, to be able to create plots with datetime attribute
rng = pd.date_range('1/1/1936 12:00:00', periods=150, freq='1H', tz='Canada/Atlantic') #Europe/Rome
df_raw = iris_df.copy()
df_raw = df_raw.set_index(rng)
df_raw.head(3)
NOTE: The default behavior is for Glue to block the execution of the notebook while the UI is running. If you would like to be able to use the notebook and Glue at the same time, run this cell before starting glue:
%gui qt
This must be executed in a separate cell, before starting Glue. [ from http://docs.glueviz.org/en/stable/python_guide/glue_from_python.html ]
%gui qt
app= qglue(iris_df=iris_df.reset_index()) # more easy if you remove the index
10*10