Question: I have two dataframes, `df1` and `df2`, where one value is changed in `df2`.
I'm trying to get the column name for the value that changed.

df1

```
    type method
0  variable   method1
1  variable   method1
2  variable   method1
3  variable   method1

```

df2

```
        type method
0    variable   method1
1    variable   method1
2    variable   method1
3  timeseries   method1

```

find the changes:

```
changes = df1.ne(df2)

```

changes:

```
    type  method
0  False   False
1  False   False
2  False   False
3   True   False

```

How would you get the column name for the column that changed?

Answer: 
Use [`DataFrame.any`](http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.any.html) for test at least one `True` per column and then filter columns names:

```
print (changes.any())
type       True
method    False
dtype: bool

print (changes.columns[changes.any()])
Index(['type'], dtype='object')

```
Nearly there; just use `any`, then index `columns` from one of your dataframes:

```
res = df1.columns[df1.ne(df2).any()]
# Index(['type'], dtype='object')

```