Q:

Is there a way to reference the dataframe subset being changed with pandas?

I have this code bellow, but i'm not sure is the best way to write it. Is there a better way to reference the dataframe selecion I am attributing the changes to?
df.VALUE[df.GROUP == 'A'] = np.where(df.CLASSE[df.GROUP == 'A'] == 'C', 0, df.VALUE[df.GROUP == 'A'])

A:

Something you should avoid in any case is to use chained assignments (this is specifically discouraged in the docs), you should instead use .loc:
df.loc[df.GROUP == 'A', 'VALUE'] = np.where(df.loc[df.GROUP == 'A', 'CLASSE'] == 'C', 0, 
                                            df.loc[df.GROUP == 'A', 'VALUE'])

