This is the 436th most frequent Chinese word.
上海
Shanghai (a major city in China).
In this sentence, '上海' refers to the proper noun indicating the city of Shanghai.
我去过上海两次。
I have been to Shanghai twice.
Here '上海' serves as the locative noun indicating where the branch is located.
这家公司在上海设有分部。
This company has a branch in Shanghai.
In this context, '上海' is used as an attributive noun describing the culture related to the city.