I have a pandas dataframe that looks like this:
import pandas as pd
import numpy as np
test_df = pd.DataFrame({'group': np.append(['A'] * 50, [['B'] * 50, ['C'] * 50]),
'value': np.random.randn(3 * 50)})
I would like to run run a t-test
between all groups A
, B
, C
.
Is there a pythonic way to do that ? I need something more generic than manually slicing the df