Notice that vars is a reserved word, it is better not to use it as the name of a variable...
You can obtain what I think is what you are trying to do with:
In general, in python try to not to iterate by index (your range(1, 100000)) as it is specially inefficient. Normally all the python operations are "vectorized" to work with the full column, row or matrix. Take a look at the numpy and pandas documentation.
You can obtain what I think is what you are trying to do with:
pd.DataFrame(([data[:k].var() for k in range(1, 10000)]))In a low level language in this case it might be better to go to the mathematical definition of variance and calculate the mean and the variance in each step, updating your accumulators... in python this might be not so optimum as you will need to access element by element your array.
In general, in python try to not to iterate by index (your range(1, 100000)) as it is specially inefficient. Normally all the python operations are "vectorized" to work with the full column, row or matrix. Take a look at the numpy and pandas documentation.