I have taken data from a csv file using numpy. numpy array has dimensions : 100*20. How do i take average of columns (say col 3,5,8) and replace them with a new column containing average of these 3 cols
If
col3 = 1,2,3,4
col5 = 2,3,4,8
col8 = 3,4,5,6
then I want to remove these 3 columns and insert a new column in which each entry contains an average of values in these 3 columns
I want to insert a new column: 2,3,4,6, delete previous 3 cols and dimension of final array to be 100*28
Is there any numpy function to do this ?
28cols? 2) What's the reference of "previous" indelete previous 3 cols? 3) Insert the new column where?