Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

lists as parameters in stats.f_oneway

result = df.groupby('cat')['num'].apply(list)
print (result)
cat
type1    [164, 172, 168, 177, 156, 195]
type2    [178, 191, 197, 182, 185, 177]
type3    [175, 193, 178, 171, 163, 176]
type4    [155, 166, 149, 164, 170, 168]
Name: num, dtype: object

F, p = scipy.stats.f_oneway(*result)
print (F)
5.406342913776015
print (p)
0.0068759477547351
Comment

PREVIOUS NEXT
Code Example
Python :: python join multiple strings ignore none and empty string 
Python :: pandas fast way to view distribution by group 
Python :: change form type flask from text to selection flask admin 
Python :: python dummy command 
Python :: kivy bind when text changes 
Python :: place a number randomly in a list python 
Python :: grouped box plot in python 
Python :: pd.read_csv how to cumsum a column 
Python :: file attributes in os 
Python :: rebuild database from zero django postgres 
Python :: python generator cheat sheet download 
Python :: how to stop gambling 
Python :: access nested set with array params python 
Python :: how to select name parent table in model laravel 
Python :: ordereddict move to end 
Python :: topaz barziv 
Python :: pylatex add section without numbering 
Python :: numpy slice double colon stack overflow 
Python :: ios iterate through dictionary 
Python :: visualizzare csv in pycharm pandas read_csv 
Python :: numpy how to dropzero 
Python :: convert excel cellname to index python 
Python :: install iris 
Python :: install formio data python library 
Python :: print python setencode 
Python :: python draw state diagrams 
Python :: sort true 
Python :: List of Pydantic model. List[BaseModel] 
Python :: change password urls 
Python :: compute the average age for each gender? * 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =