কম্পিউটার

Python - পান্ডাস সূচকের সর্বোচ্চ মান ফেরত দিন


পান্ডাস সূচকের সর্বোচ্চ মান ফেরাতে, index.max() ব্যবহার করুন পদ্ধতি প্রথমে, প্রয়োজনীয় লাইব্রেরি আমদানি করুন -

import pandas as pd

পান্ডাস সূচক তৈরি করা হচ্ছে

index = pd.Index([10, 20, 70, 40, 90, 50, 25, 30])

পান্ডাস সূচক প্রদর্শন করুন -

print("Pandas Index...\n",index)

সর্বাধিক মান −

পান
print("\nMaximum value..\n", index.max())

উদাহরণ

নিম্নলিখিত কোড -

import pandas as pd

# Creating Pandas index
index = pd.Index([10, 20, 70, 40, 90, 50, 25, 30])

# Display the Pandas index
print("Pandas Index...\n",index)

# Return the number of elements in the Index
print("\nNumber of elements in the index...\n",index.size)

# Return the dtype of the data
print("\nThe dtype object...\n",index.dtype)

# get the maximum value
print("\nMaximum value..\n", index.max())

আউটপুট

এটি নিম্নলিখিত আউটপুট −

তৈরি করবে
Pandas Index...
Int64Index([10, 20, 70, 40, 90, 50, 25, 30], dtype='int64')

Number of elements in the index...
8

The dtype object...
int64

Maximum value..
90

  1. Python Pandas - সূচক দ্বারা নির্বাচিত মানগুলির একটি নতুন সূচক ফেরত দিন

  2. Python Pandas - Timedelta অবজেক্টের সর্বনিম্ন মান ফেরত দিন

  3. পাইথন - পান্ডাস সূচকের সর্বনিম্ন মান ফেরত দিন

  4. Python Pandas - Timedelta অবজেক্টের সর্বোচ্চ মান ফেরত দিন