How To Access Another Columns Value From A Given Id

[Solved] How To Access Another Columns Value From A Given Id | Scala - Code Explorer | yomemimo.com
Question : How to access another column's value from a given id number in pandas DataFrame?

Answered by : sid

In [21]: df.set_index('id').loc['b', 'label']
Out[21]: 'sal'

Source : https://stackoverflow.com/questions/70497494/how-to-access-another-columns-value-from-a-given-id-number-in-pandas-dataframe?noredirect=1&lq=1 | Last Update : Thu, 23 Jun 22

Answers related to how to access another columns value from a given id number in pandas dataframe

Code Explorer Popular Question For Scala