Assuming I've the following data frame:

```
import pandas as pd
df = pd.DataFrame(['a', 'b', 'c', 'd', 'a', 'c', 'f', 'a'])
print(df)

```

I can replace any occurrence of 'a' with 'AAA' as follows:

```
df.columns = ['Letters']   
for i, x in enumerate(df['Letters']):
    if x == 'a':
        df['Letters'][i] = "AAA"
print(df)

```

But if I extracted unique row and try to do the same thing, it does not work. 

```
df = pd.DataFrame(['a', 'b', 'c', 'd', 'a', 'c', 'f', 'a'])
df.columns = ['Letters']
grouped = df.groupby('Letters')
index = [gp_keys[0] for gp_keys in grouped.groups.values()]
unique_df = df.reindex(index)
print(unique_df) 

for i, x in enumerate(unique_df):
    if x == 'a':
        unique_df.loc[i] = "AAA"
print(unique_df)

```

I am curious why doing `unique_df[i] = "AAA"` no longer modifies the data frame values. Even doing `unique_df.loc[i] = "AAA"` as suggested in the view versus copy post [here](https://stackoverflow.com/questions/17557650/edit-pandas-dataframe-using-indexes) seems to make no difference. It seems there is something about the `groupby` function that makes later modification on the data frame elusive. Any thoughts?