from typing import Counter


def get_skills_tf(df):
    """
    Calculates term-frequency for skills based on a pandas dataframe.
    """
    skills_temp = df['csv_skills'].values
    skills_temp = [str.lower(s).split(', ') for s in skills_temp]  # .encode('ascii', 'ignore')
    skills_list = []
    for s in skills_temp:
        skills_list.extend([sk.split('/') for sk in s])

    skills_count = Counter(skills_list)
    return skills_count