Ive been looking through all the previous posts but cant seem to find an answer on this.  

If I create a column with shift I seem to keep getting the:  

> 
> SettingWithCopyWarning:   
>  A value is trying to be set on a copy of
> a slice from a DataFrame
> 
> 
> 

How do I remove this warning without suppressing it?  

Code:  

```
dfTest = pd.DataFrame(range(10),columns=['A'])
Result:
   A
0  0
1  1
2  2
3  3
4  4
5  5
6  6
7  7
8  8
9  9

```

```
dfTest['B'] = dfTest['A'].shift(1)
dfTest['B'].iloc[5] = 20

SettingWithCopyWarning...

```

**Edit:**
I have tried the following but didnt seem to change anything

```
dfTest.loc[:, 'B'] = dfTest['A'].shift(1)
dfTest = dfTest.copy()
dfTest = dfTest.copy(deep=True)

```