def merge_breed_ranking(train):
    breeds = pd.read_csv('../input/breed-labels-with-ranks/breed_labels_with_ranks.csv').drop('BreedName', axis=1)
    train = train.merge(breeds, how='left', left_on='fix_Breed1', right_on='BreedID')
    train = train.rename(columns={'BreedCatRank': 'BreedCatRank_main', 'BreedDogRank': 'BreedDogRank_main'})
    train = train.merge(breeds, how='left', left_on='fix_Breed2', right_on='BreedID')
    train = train.rename(columns={'BreedCatRank': 'BreedCatRank_second', 'BreedDogRank': 'BreedDogRank_second'})
    return train
def merge_breed_ranking(train):
    breeds = pd.read_csv('../input/breed-labels-with-ranks/breed_labels_with_ranks.csv').drop('BreedName', axis=1)
    train = train.merge(breeds, how='left', left_on='fix_Breed1', right_on='BreedID')
    train = train.rename(columns={'BreedCatRank': 'BreedCatRank_main', 'BreedDogRank': 'BreedDogRank_main'})
    train = train.merge(breeds, how='left', left_on='fix_Breed2', right_on='BreedID')
    train = train.rename(columns={'BreedCatRank': 'BreedCatRank_second', 'BreedDogRank': 'BreedDogRank_second'})
    return train