Say I have the following DataFrame:

```
arrays = [['foo', 'foo', 'bar', 'bar'],
          ['A', 'B', 'C', 'D']]
tuples = list(zip(*arrays))          
columnValues = pd.MultiIndex.from_tuples(tuples)
df = pd.DataFrame(np.random.rand(4,4), columns = columnValues)
print(df)

             foo                 bar          
               A         B         C         D
0       0.037362  0.470010  0.315396  0.333798
1       0.339038  0.396307  0.487242  0.064883
2       0.691654  0.793609  0.044490  0.384154
3       0.605801  0.967021  0.156839  0.123816

```

I want to produce the following output:

```
             foo                 bar          
               A         B         C         D
0              0         0  0.315396  0.333798
1              0         0  0.487242  0.064883
2              0         0  0.044490  0.384154
3              0         0  0.156839  0.123816

```

I think I can use `pd.DataFrame.where()` for this, however I don't see how to pass the column name `bar` as a condition.

EDIT: I'm looking for a way to specifically use `bar` instead of `foo` to produce the desired outcome, as `foo` would actually be many columns

EDIT2: Unfortunately list comprehension breaks if the list contains all the column labels. Explicitly writing out the for loop does work though.
So instead of this:

```
df.loc[:,  [col for col in df.columns.levels[0] if col != 'bar']] = 0 

```

I use this:

```
for col in df.columns.levels[0]:
    if not(col in nameList):
        df.loc[:,col]=0

```