pandas.DataFrame.get
pandas 3.1.1 · DataFrame · method
Retrieve an object by key. A Series or DataFrame can also return a supplied default for an unknown key.
Call syntax
DataFrame.get(key, default=None)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
key |
Required Positional or keyword |
object Provide the lookup key, or a transformation callable for a sorting method. |
default |
Optional Positional or keyword Default None |
object |
Returns
same type as items contained in object