How to Get the minimum value from the Pandas dataframe in Python? Last Updated : 14 Jan, 2022 Summarize Comments Improve Suggest changes Share Like Article Like Report In this article, we will discuss how to get the minimum value from the Pandas dataframe in Python. We can get the minimum value by using the min() function Syntax: dataframe.min(axis) where, axis=0 specifies columnaxis=1 specifies rowGet minimum value in dataframe row To get the minimum value in a dataframe row simply call the min() function with axis set to 1. Syntax: dataframe.min(axis=1) Example: Get minimum value in a dataframe row Python3 # import pandas module import pandas as pd # create a dataframe # with 5 rows and 4 columns data = pd.DataFrame({ 'name': ['sravan', 'ojsawi', 'bobby', 'rohith', 'gnanesh'], 'subjects': ['java', 'php', 'html/css', 'python', 'R'], 'marks': [98, 90, 78, 91, 87], 'age': [11, 23, 23, 21, 21] }) # display dataframe print(data) # get the minimum in row data.min(axis=1) Output: Get the minimum value in column To get the minimum value in a column simply call the min() function using axis set to 0. Syntax: dataframe.min(axis=0) Example: Get minimum value in a column Python3 # import pandas module import pandas as pd # create a dataframe # with 5 rows and 4 columns data = pd.DataFrame({ 'name': ['sravan', 'ojsawi', 'bobby', 'rohith', 'gnanesh'], 'subjects': ['java', 'php', 'html/css', 'python', 'R'], 'marks': [98, 90, 78, 91, 87], 'age': [11, 23, 23, 21, 21] }) # display dataframe print(data) # get the minimum in column data.min(axis=0) Output: Get the minimum value in a particular column To get the minimum value in a particular column call the dataframe with the specific column name and min() function. Syntax: dataframe['column_name'].min() Example: Get the minimum value in a particular column Python3 # import pandas module import pandas as pd # create a dataframe # with 5 rows and 4 columns data = pd.DataFrame({ 'name': ['sravan', 'ojsawi', 'bobby', 'rohith', 'gnanesh'], 'subjects': ['java', 'php', 'html/css', 'python', 'R'], 'marks': [98, 90, 78, 91, 87], 'age': [11, 23, 23, 21, 21] }) # display dataframe print(data) # get the minimum in name column print(data['name'].min()) # get the minimum in subjects column print(data['subjects'].min()) # get the minimum in age column print(data['age'].min()) # get the minimum in marks column print(data['marks'].min()) Output: Comment More infoAdvertise with us Next Article How to Get the Minimum and maximum Value of a Column of a MySQL Table Using Python? S sravankumar_171fa07058 Follow Improve Article Tags : Python Python-pandas Python pandas-dataFrame pandas-dataframe-program Practice Tags : python Similar Reads How to Get the maximum value from the Pandas dataframe in Python? Python Pandas max() function returns the maximum of the values over the requested axis. Syntax: dataframe.max(axis) where, axis=0 specifies columnaxis=1 specifies rowExample 1: Get maximum value in dataframe row To get the maximum value in a dataframe row simply call the max() function with axis set 2 min read How to Drop Negative Values in Pandas DataFrame Handling data effectively is crucial in data analysis and manipulation. One common task is cleaning the data by removing negative values, especially when they are considered outliers or invalid entries. The Pandas library in Python offers several efficient methods to accomplish this. This article wi 3 min read Pandas Dataframe/Series.tail() method - Python The tail() method allows us to quickly preview the last few rows of a DataFrame or Series. This method is useful for data exploration as it helps us to inspect the bottom of the dataset without printing everything. By default it returns the last five rows but this can be customized to return any num 3 min read How to Get the Minimum and maximum Value of a Column of a MySQL Table Using Python? Prerequisite: Python: MySQL Create Table In this article, we are going to see how to get the Minimum and Maximum Value of a Column of a MySQL Table Using Python. Python allows the integration of a wide range of database servers with applications. A database interface is required to access a database 2 min read Get n-smallest values from a particular column in Pandas DataFrame Pandas DataFrame is two-dimensional size-mutable, potentially heterogeneous tabular data structure with labeled axes (rows and columns). Let's see how can we can get n-smallest values from a particular column in Pandas DataFrame. Observe this dataset first. We'll use 'Age', 'Weight' and 'Salary' col 1 min read Get the index of minimum value in DataFrame column Pandas DataFrame is two-dimensional size-mutable, potentially heterogeneous tabular data structure with labeled axes (rows and columns). Let's see how can we get the index of minimum value in DataFrame column. Observe this dataset first. We'll use 'Weight' and 'Salary' columns of this data in order 2 min read Like