How much longer is this proroguation?

Dataset is from here.

In [46]:
import pandas as pd
import as px

data = (
    pd.read_excel('../assets/prorogation.xlsx', skiprows=8, skipfooter=3)
        ProrogationDays=lambda x: x['Calendar Days Between Date of New Session and Prorogation of Previous Session'],
        ProrogationDate=lambda x: x['Prorogation Date'].shift(1),
        Election=lambda x: x['General Election Before Session'].fillna('N')
    # Since...
    .loc[lambda x: x.ProrogationDate > pd.datetime(1950, 1, 1)]

<class 'pandas.core.frame.DataFrame'>
Int64Index: 63 entries, 54 to 122
Data columns (total 10 columns):
Session                                                                          63 non-null object
Date of Meeting                                                                  63 non-null datetime64[ns]
Prorogation Date                                                                 56 non-null datetime64[ns]
Dissolution Date                                                                 18 non-null datetime64[ns]
General Election Before Session                                                  12 non-null object
Election Date                                                                    12 non-null object
Calendar Days Between Date of New Session and Prorogation of Previous Session    63 non-null float64
ProrogationDays                                                                  63 non-null float64
ProrogationDate                                                                  63 non-null datetime64[ns]
Election                                                                         63 non-null object
dtypes: datetime64[ns](4), float64(2), object(4)
memory usage: 5.4+ KB

In [3]:
fig =, x='ProrogationDate', y='ProrogationDays', color='Election')

with open('../iframes/prorogation_full.html', 'w') as f: