text_html_output_1.png text_plain_output_1.png
import numpy as np # linear algebra

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import plotly.express as px

data = pd.read_csv('/kaggle/input/associativeinference/Associative Inference.csv')

data.columns

age_group = data[['AgeGroup', 'AB1-BC1']]
age_group.head()
grouped = age_group.groupby('AgeGroup', as_index=False)
summary = grouped.mean()
summary
temp = grouped.describe()['AB1-BC1'][['count', 'std']]
temp
summary['std_err'] = temp['std'] / np.sqrt(temp['count'])
summary = summary.reindex([1, 0, 3, 2])
fig = px.bar(summary, x='AgeGroup', y='AB1-BC1', error_y='std_err', width=500, title='AB1-BC1')
fig.show()