DataFrame.lookup(self, row_labels, col_labels)
[source]
Label-based “fancy indexing” function for DataFrame.
Given equal-length arrays of row and column labels, return an array of the values corresponding to each (row, col) pair.
Parameters: |
|
---|---|
Returns: |
|
Akin to:
result = [df.get_value(row, col) for row, col in zip(row_labels, col_labels)]
values : ndarray
© 2008–2012, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/0.25.0/reference/api/pandas.DataFrame.lookup.html