Importing data and variable names from a text file in Python
问题 I have a text file containing simulation data (60 columns, 100k rows): a b c 1 11 111 2 22 222 3 33 333 4 44 444 ... where in the first row are variable names, and beneath (in columns) is the corresponding data (float type). I need to use all these variables with their data in Python for further calculations. For example, when I insert: print(b) I need to receive the values from the second column. I know how to import data: data=np.genfromtxt("1.txt", unpack=True, skiprows = 1) Assign