Q:

Calculate attribute table field using a near function (or a similar function)

I'm having an attribute table with a field called 'name' which represents the streetnames of an area. The streetnames are derived from OSM, but unfortunately not all street (or parts of streets) have a streetname related to them. I believe that the reason for this is due to the difference of streettype (primary, secundary etc). What I want to do is to fill these missing streetnames with the streetname of the street that is closest to the street with the missing name. 
I believe the best option to do this is to calculate the field using a near function, but I'm not that experienced in Python or other programming language. Therefore, I'm not really sure if my theory is plausible and/or the right one. 
I have added a screenshot of the attributetable to give you an idea: 

A:

calculate field does not directly use spatial relationships between features. 
1) Select the roads without an empty value in the "name" field (in other words, with an non empty "name" (NOT "name" = '' ). Those are the roads that contain the information about road names that you are looking for.  
2) Create a second layer from this selection 
3) remove the selection and run "spatial join" to obtain the value of the nearest road with a name
4) use field calculator to update your "name" field (only for the selection of empty names)
EDIT : joining lines to lines could be an issue when several roads are crossing. In order  to improve the matching, I would convert all lines to their vertices (vertices to point), run the spatial join then use a majority rule to determine the "best match". 

