Inconsistent SettingWithCopyWarning
#### Code Sample, a copy-pastable example if possible

```
import os, io, math
import numpy as np, pandas as pd

performance_df = pd.DataFrame()
performance_df["GAP"] = np.random.randn(75)
performance_df["SETTINGS"] = [['default', 'MLrank', 'MLselect'][int(i/25)] for i in range(75)]
performance_df["INSTANCE_NAME"] = [i%25 for i in range(75)]


performance_df = pd.read_csv("/home/twang/Ausarbeitung/rootperformance.csv", header=0)

default_df = performance_df[performance_df["SETTINGS"].str.match('default')]
rank_df = performance_df[performance_df["SETTINGS"].str.match('MLrank')]
select_df = performance_df[performance_df["SETTINGS"].str.match('MLselect')]

compare_df = default_df.drop(["SETTINGS"], axis=1).merge(
                                  rank_df.drop(["SETTINGS"], axis=1), on=["INSTANCE_NAME"], validate="1:1", suffixes=("","_MLrank")).merge(
                                  select_df.drop(["SETTINGS"], axis=1), on=["INSTANCE_NAME"], validate="1:1", suffixes=("_default","_MLselect") ).copy(deep=True)




gap_compare = compare_df.query("GAP_default<=9e19 and GAP_MLrank<=9e19", inplace=False)#.copy(deep=True)


gap_compare.loc[:,("GAP_MLselect")] = gap_compare.loc[:,["GAP_MLselect"]].where(gap_compare["GAP_MLselect"].values.reshape(-1,1) <= 9e19, np.random.randn(gap_compare.shape[0], 1), inplace=False, axis=0)
```

#### Problem description
I receive a SettingWithCopyWarning when loading the dataframe from my csv. But creating the df doesn't trigger a warning. I would expect it to be indifferent whether I load a csv or create df in python.  Using deep copy at the second place, prevents the warning. But the first deep copy doesn't.


