SettingWithCopyWarning false positive when using .loc
I have the following code, which produces the SettingWithCopyWarning:

```
segments = df_source1.Code.unique().tolist()

for segment in segments:
    seg = segment[-1]

    df_source1.loc[df_source1.Code == segment, 'Seg'] = seg
```

```
C:\Anaconda3\envs\jupyter\lib\site-packages\pandas\core\indexing.py:266: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
  self.obj[key] = _infer_fill_value(value)
```

I wouldn't expect to receive this warning since I'm using .loc exactly as it suggests I should be. It did occur to me that I could probably find a much better way to do this via apply, but I still run into this warning popping up all over the place, and it always makes me think I'm doing something wrong (which in this case I may be, performance wise).
