Hello I have the following list of dataframes generate by:
Code:
def frequency_tables(headers, target, data):
freq = []
for i in headers:
freq_table = data.groupby([i, target]).size().reset_index(name="Time")
freq.append(freq_table)
return freq
Data frame:
outlook play Time
overcast yes 4
rainy no 2
rainy yes 3
sunny no 3
sunny yes 2
I'd like to know how to get the values of Time using the values from outlook and do some calculus, for example:
rainy|yes + rainy|no = 5