pandas.DataFrame.at function with example in python

Spread the love

pandas.DataFrame.at() ; This function access a single value for a row/column label pair.

Similar to loc, in that both provide label-based lookups. Use at if you only need to get or set a single value in a DataFrame or Series.

Example Program:

import pandas as pd d = {'exp': [1, 2], 'salary': [10000, 15000]} df = pd.DataFrame(data=d) print(df.at[1, 'salary'])
admin

admin

Leave a Reply

Your email address will not be published. Required fields are marked *