Given I have four lists (in reality I have many more, read in from a CSV as numpy arrays) such that:
a = [54,35,67...]
b = [45,21,87...]
c = [32,58,52...]
d = [4,78,43...]
# In reality I have plant % cover surveyed at a location
and four lists like:
A = ['foo', 'bar', 'ham'...]
B = ['eggs', 'spam', 'bar'...]
C = ['ham', 'eggs', 'foo'...]
D = ['eggs', 'spam', 'bar'...]
# These are plant species
I can find the max of a, b, c and d using:
max = [a, b, c, d].max(axis=0)
# The max plant % cover between a, b, c and d on the 0 axis
to get:
max = [54, 78, 87...]
# the plant species that accompanies the max plant % cover
but how do I now get the corresponding text value, so my output looks like:
Text = ['foo', 'spam', 'bar'...]
AttributeError