diff --git a/datavolley/helpers.py b/datavolley/helpers.py index 1352ab71..985af503 100644 --- a/datavolley/helpers.py +++ b/datavolley/helpers.py @@ -234,28 +234,6 @@ def get_set(rows_list): df = df_cleaned return df -def get_base_code(code): - """ - Extracts the base code value from a given row of data. - - Parameters: - code (str): A string containing data from which the base attack value is to be extracted. - - Returns: - string | None: The base attack value extracted from the code. - The function returns a string if a valid base value is found - or None if no value is applicable. - - This function processes a single code to determine the base attack metric, - depending on the structure and content of the string. - """ - bs = None - if code.find("E") > -1: - bs = code[6:8] - if bs == '~~': - bs = None - return bs - # get player number out of code def calculate_skill(row): """ @@ -305,7 +283,7 @@ def calculate_skill(row): 'player_name', 'player_id', 'skill', 'skill_type', 'evaluation_code', 'setter_position', 'evaluation', 'attack_code', 'attack_description', 'set_code', - 'set_description', 'set_type', 'base_code', + 'set_description', 'set_type', 'start_zone', 'end_zone', 'end_subzone', 'end_cone', 'skill_subtype', 'num_players', 'num_players_numeric', 'special_code', diff --git a/datavolley/read_dv.py b/datavolley/read_dv.py index 0f127a8f..a65a0cf5 100644 --- a/datavolley/read_dv.py +++ b/datavolley/read_dv.py @@ -10,7 +10,7 @@ from .helpers import get_match, get_set, get_teams,\ calculate_skill, skill_map, eval_codes,\ desired_order, add_xy, get_setter_calls,\ - get_attack_combinations, get_base_code + get_attack_combinations pd.set_option('future.no_silent_downcasting', True) @@ -417,8 +417,6 @@ def replace_coordinates(coord): plays['skill'] = plays.apply(calculate_skill, axis=1) plays['skill'] = plays['skill'].map(skill_map) - # Create base_code - plays['base_code'] = plays['code'].apply(get_base_code) # Create evaluation_code plays['evaluation_code'] = plays['code'].str[5] plays['evaluation_code'] =\