Module dcg_sci_tool.csv.averaging_count_matches
Functions
def averaging_count_matches(list_src: List[Tuple[Any, ...]],
list_target: List[Tuple[Any, ...]],
index_a: int = 3,
index_b: int = 4) ‑> List[Tuple[Any, ...]]-
统计list_src中元组的指定元素在list_target中的出现次数,并计算其他元素的平均值
Args
list_src:List[Tuple[Any, …]]- 源元组列表
list_target:List[Tuple[Any, …]]- 目标元组列表
index_a:int- 要统计第一个元素的索引
index_b:int- 要统计第二个元素的索引
Returns
List[Tuple[Any, …]]- 更新后的list_target,每个元组末尾添加了计数和平均值