import json


def parse_genres(movie):
    """
    Convert genres to a dictionnary for dataframe.
    :param movie: movie dictionnary
    :return: well-formated dictionnary with genres
    """   
    parse_genres = {}
    g = movie['genres']
    with open('genre.json', 'r') as f:
        genres = json.load(f)
    for k, genre in enumerate(g):
        if genre in genres:
            parse_genres['genre_{}'.format(k+1)] = genres[genre]
    return parse_genres