How to find MIN, MAX in a Dictionary?
DATA MUNGING DATA CLEANING PYTHON MACHINE LEARNING RECIPES PANDAS CHEATSHEET     ALL TAGS

# How to find MIN, MAX in a Dictionary?

This recipe helps you find MIN, MAX in a Dictionary

## Recipe Objective

Statical analysis is very important part preprocessing. Have you tried to find minimum and maximum value in a dictionary?

So this is the recipe on how we can find MIN, MAX in a Dictionary.

## Step 1 - Creating a dictionary

We have created a dictionary with different values. ``` ages = {"John": 21, "Mike": 52, "Sarah": 12, "Bob": 43} ```

## Step 2 - Finding minimum and maximum value

We have calculated minimum and maximum values of the dictionary. ``` print("Maximum Value: "); print(max(zip(ages.values(), ages.keys()))) print("Minimum Value: "); print(min(zip(ages.values(), ages.keys()))) ``` So the output comes as

```Maximum Value:
(52, "Mike")

Minimum Value:
(12, "Sarah")
```

#### Relevant Projects

##### Data Science Project-TalkingData AdTracking Fraud Detection
Machine Learning Project in R-Detect fraudulent click traffic for mobile app ads using R data science programming language.

##### Demand prediction of driver availability using multistep time series analysis
In this supervised learning machine learning project, you will predict the availability of a driver in a specific area by using multi step time series analysis.

##### PySpark Tutorial - Learn to use Apache Spark with Python
PySpark Project-Get a handle on using Python with Spark through this hands-on data processing spark python tutorial.

##### Time Series Analysis Project in R on Stock Market forecasting
In this time series project, you will build a model to predict the stock prices and identify the best time series forecasting model that gives reliable and authentic results for decision making.

##### Machine Learning or Predictive Models in IoT - Energy Prediction Use Case
In this machine learning and IoT project, we are going to test out the experimental data using various predictive models and train the models and break the energy usage.

##### Data Science Project - Instacart Market Basket Analysis
Data Science Project - Build a recommendation engine which will predict the products to be purchased by an Instacart consumer again.

##### Machine Learning project for Retail Price Optimization
In this machine learning pricing project, we implement a retail price optimization algorithm using regression trees. This is one of the first steps to building a dynamic pricing model.

##### German Credit Dataset Analysis to Classify Loan Applications
In this data science project, you will work with German credit dataset using classification techniques like Decision Tree, Neural Networks etc to classify loan applications using R.

##### Build a Similar Images Finder with Python, Keras, and Tensorflow
Build your own image similarity application using Python to search and find images of products that are similar to any given product. You will implement the K-Nearest Neighbor algorithm to find products with maximum similarity.

##### Build a Music Recommendation Algorithm using KKBox's Dataset
Music Recommendation Project using Machine Learning - Use the KKBox dataset to predict the chances of a user listening to a song again after their very first noticeable listening event.