How to use .map using parts of dataframes

I am using .map to replace values that fall into interval into a dataframe. I am not sure if it is because I am using the .map function or because I am copying on a copy of the dataframe:

intervals = pd.DataFrame(columns = ['Hole','From','To','Value'], data = [['N',0,100,'A'],['N',100,200,'B'],['N',200,500,'C'],['Q',1,101,'A'],['Q',101,201,'B'],['Q',201,501,'C']])
print('intervals\n',intervals,'\n')

points = pd.DataFrame(columns = ['Hole','Point', 'Value'], data = [['N',45,'X'],['N',125,'X'],['N',145,'X'],['N',345,'X'],['Q',45,'X'],['Q',125,'X'],['Q',145,'X'],['Q',345,'X']])
print('points\n',points,'\n')

holelist = intervals['Hole'].unique()
print(holelist)
intervallist = []

for hole in holelist:
    holeintervaldf = intervals[intervals['Hole'] == hole]
    print('holeintervaldf\n',holeintervaldf)
    holeintervaldf=holeintervaldf.set_index(keys = pd.IntervalIndex.from_arrays(left = holeintervaldf['From'], right = holeintervaldf['To']))['Value']
    print('holeintervaldf with intervalsas index\n',holeintervaldf)
    points[points['Hole']==hole]['Value'] = points[points['Hole']==hole]['Point'].map(holeintervaldf) #this is where something is wrong


for j in intervallist: print(j)

print(points)

Thanks a bunch!