On this page
pandas.DataFrame.lookup
- DataFrame.lookup(row_labels, col_labels)[source]
-
Label-based “fancy indexing” function for DataFrame.
Deprecated since version 1.2.0: DataFrame.lookup is deprecated, use pandas.factorize and NumPy indexing instead. For further details see Looking up values by index/column labels.
Given equal-length arrays of row and column labels, return an array of the values corresponding to each (row, col) pair.
- Parameters
-
- row_labels:sequence
-
The row labels to use for lookup.
- col_labels:sequence
-
The column labels to use for lookup.
- Returns
-
- numpy.ndarray
-
The found values.
© 2008–2022, 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/1.5.0/reference/api/pandas.DataFrame.lookup.html