I am using pandas which very efficiently sorts/filters the data they way I need.
This code worked fine, until I changed the last column to a complex number; now I ge
Or you can parse it directly as a complex number by passing in a converter for that column when you read in the data:
pd.read_csv('final.dat', header=None, names=['X.1', 'X.2', 'X.3', 'X.4','X.5', 'X.6', 'X.7', 'X.8'], converters={'X.8': lambda s: np.complex(s.replace('i', 'j'))})