dictionary - How to use columns of a key in a dict in Python? -


I dict = { 'a': array [5, 5]} , where Array [5, 5] means that it is read from data file as 5X5 as an array. And I just want to use the first column of value like dict ['a']: array [, 1]] , how can I create it? Thanks! A part of my code:

  Sync [C% i '% i] = np.loadtxt (' 0cracknodecoord.txt ', usecols = (0, 1)) print (coordination [ 'C1': array [:, [1]]]  

print (coordination [ 'C1': array [:, [1]]]) did not work.

I'm not sure, but I think you want:

  dict [ 'a'] [:, 1]  

you were very close before!


Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -