def _create_count_dataframe(df):
    return df.groupby(['year_published']) \
        .agg(dict(title='count', is_archived='sum', has_formal_description='sum',
                  has_odd='sum', has_visual_documentation='sum')) \
        .rename(columns={
        'title': 'count',
        'is_archived': IncludedStatistics.code_availability_count.name,
        'has_formal_description': IncludedStatistics.formal_description_count.name,
        'has_odd': IncludedStatistics.odd_count.name,
        'has_visual_documentation': IncludedStatistics.visual_documentation_count.name
    }).reindex(pd.RangeIndex(start=1995, stop=2018, name='year_published'), fill_value=0.0)