def parse_actors(movie):
    """
    Convert casting information to a dictionnary for dataframe.
    Keeping only 3 actors with most facebook likes.
    :param movie: movie dictionnary
    :return: well-formated dictionnary with casting information
    """
    sorted_actors = sorted(movie['cast_info'], key=lambda x:x['actor_fb_likes'], reverse=True)
    top_k = 3
    parsed_actors = {}
    parsed_actors['total_cast_fb_likes'] = sum([actor['actor_fb_likes'] for actor in movie['cast_info']]) + movie['director_info']['director_fb_links']
    for k, actor in enumerate(sorted_actors[:top_k]):
        if k < len(sorted_actors):
            parsed_actors['actor_{}_name'.format(k+1)] = actor['actor_name']
            parsed_actors['actor_{}_fb_likes'.format(k+1)] = actor['actor_fb_likes']
        else:
            parsed_actors['actor_{}_name'.format(k+1)] = None
            parsed_actors['actor_{}_fb_likes'.format(k+1)] = None
    return parsed_actors