QST: panda fillna SettingWithCopyWarning:
- [x] I have searched the [[pandas] tag](https://stackoverflow.com/questions/tagged/pandas) on StackOverflow for similar questions.

- [x] I have asked my usage related question on [StackOverflow](https://stackoverflow.com).

---

#### Question about pandas

I tried two different lines of code.
Both of them gave me the desired outcome, which replaced the NANs by '0'. However, the first line did not give me settingwithcopy warning, the second one did. I am so confused. Can anyone tell me why? Is that because the X.loc[0:, 'Type'] returned a view and X.loc[:, 'Type'] returned a copy? If the second one returned a copy, why X's NANs have been replaced?
**Note**: If you'd still like to submit a question, please read [this guide](
https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your question.

```python
# Your code here, if applicable
X.loc[0:, 'Type'].fillna('0', inplace=True) 
X.loc[:, 'Type'].fillna('0', inplace=True) 
```
