`np.average()` format option
<p>I'm trying to understand a python code, a specific line of the code has troubled me a bit:</p>

<pre><code>mean = np.average(data[:,index])
</code></pre>

<p>I understand that this is an average calculation of <code>data</code> declared early above, but what does <code>[:,index]</code>indicate?
I apologise if this question is duplicated, but please link me a solution before you mark it down. This is the first day I'm exposed to Python, please excuse my ignorance. Appreciate for any kind advice!<br>
  below is part of the original code</p>

<pre><code>data = np.genfromtxt(args.inputfile)

def doBlocking(data,index):
ndata = data.shape[0]       
ncols = data.shape[1]-1
#things unimportant
mean = np.average(data[:,index])
#more unimportance
</code></pre>