<jupyter_start><jupyter_text>ANOVA<jupyter_code>data=pd.melt(df.reset_index(),id_vars=['index'],value_vars=['System A','System B','System C'])
data.columns=['index','treatments','value']
model=ols('value~C(treatments)',data=data).fit()
anova_table=sm.stats.anova_lm(model,typ=1)
anova_table
df=pd.read_excel('rbd2.xlsx')
df
data=pd.melt(df.reset_index(),id_vars=['index'],value_vars=['chem1','chem2','chem3','chem4'])
data.columns=['index','treatments','value']
model=ols('value~C(treatments)',data=data).fit()
aov_table=sm.stats.anova_lm(model,typ=1)
aov_table
data.columns=['Fabric Samples','Chemical Types','value']
data
model=ols('value~ C(Fabric Samples)+ C(Chemical Types)',data=data).fit()
aov_table=sm.stats.anova_lm(model,typ=1)
aov_table<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.2175032175032175, 'fraction_numerical': 0.010296010296010296, 'mean_word_length': 16.681818181818183, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '562840', 'license': 'MIT', 'n_tokens_mistral': 324, 'n_tokens_neox': 306, 'n_words': 26, 'path': 'WEEK 6 RBD.ipynb', 'repo_name': 'Khushi-Mattu/Data-Analytics-with-Python-NPTEL', 'size': '777'}