The .values attribute is often a copy - especially for mixed dtypes (so assignment to it is not guaranteed to work - in newer versions of pandas this will raise).
You should assign to the specific columns (note the order is important).
df = pd.DataFrame(arr, columns=some_list_of_names)
df[some_list_of_names] = myfunction(arr)
Example (in pandas 0.15.2):
In [11]: df = pd.DataFrame([[1, 2.], [3, 4.]], columns=['a', 'b'])
In [12]: df.values = [[5, 6], [7, 8]]
AttributeError: can't set attribute
In [13]: df[['a', 'b']] = [[5, 6], [7, 8]]
In [14]: df
Out[14]:
a b
0 5 6
1 7 8
In [15]: df[['b', 'a']] = [[5, 6], [7, 8]]
In [16]: df
Out[16]:
a b
0 6 5
1 8 7
myfunctionfirst and then pass the result to DataFrame when you initially create it?