In [213]: import pandas as pd
Make a dataframe, as you do with the file read:
In [214]: df = pd.DataFrame(np.arange(100), columns=['mag'])
In [215]: df
Out[215]:
mag
0 0
1 1
2 2
3 3
4 4
.. ...
95 95
96 96
97 97
98 98
99 99
[100 rows x 1 columns]
Select one column, getting a pandas Series:
In [216]: s = df['mag']
In [217]: s
Out[217]:
0 0
1 1
2 2
3 3
4 4
..
95 95
96 96
97 97
98 98
99 99
Name: mag, Length: 100, dtype: int64
THe series as a numpy array (or array derived from the series):
In [218]: s.to_numpy()
Out[218]:
array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99])
Use np.split
to divide the array in 10 equal sized arrays. The result is a list. No need to assign them individually to variables.
In [219]: np.split(s.to_numpy(),10)
Out[219]:
[array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]),
array([10, 11, 12, 13, 14, 15, 16, 17, 18, 19]),
array([20, 21, 22, 23, 24, 25, 26, 27, 28, 29]),
array([30, 31, 32, 33, 34, 35, 36, 37, 38, 39]),
array([40, 41, 42, 43, 44, 45, 46, 47, 48, 49]),
array([50, 51, 52, 53, 54, 55, 56, 57, 58, 59]),
array([60, 61, 62, 63, 64, 65, 66, 67, 68, 69]),
array([70, 71, 72, 73, 74, 75, 76, 77, 78, 79]),
array([80, 81, 82, 83, 84, 85, 86, 87, 88, 89]),
array([90, 91, 92, 93, 94, 95, 96, 97, 98, 99])]
If you don't understand the logic of a list of arrays instead of assignment to individual variables, you need to read some more basic Python.