Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Find largest value in column Pandas?

I have this task where I have to find the largest N value in ‘Salary’ column. How do i do that?

Here’s the code:

    import numpy as np
    import pandas as pd 
    # TODO: Find the largest number in 'Salary' column
    
    data_one = pd.read_excel("C:\\Users\\HP\\Documents\\DataScience task\\Employee.xlsx")
    dataframe_data = pd.DataFrame(data_one)
    find_largest_salary = dataframe_data['Salary']

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

the way you have described the question, the answer is simply this:

find_largest_salary = dataframe_data['Salary'].max()
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading