How to do numerical operations in Python using Numpy?
DATA MUNGING DATA CLEANING PYTHON MACHINE LEARNING RECIPES PANDAS CHEATSHEET     ALL TAGS

How to do numerical operations in Python using Numpy?

How to do numerical operations in Python using Numpy?

This recipe helps you do numerical operations in Python using Numpy

0

Recipe Objective

Numerical operation are very essential part of data preprocessing.

So this is the recipe on how we can do numerical operations in Python using Numpy.

Step 1 - Loading Library

We have imported numpy which is needed. import numpy as np

Step 2 - Creating a Matrix

We have created an numpy array. sales = np.array([4352, 233, 3245, 256, 2394]) print(sales)

Step 3 - Numerical analysis

We have done calculated mean, minimum, maximum and sum of the values in array. print(sales.mean()) print(sales.sum()) print(sales.min()) print(sales.max()) So the output comes as

[4352  233 3245  256 2394]

2096.0

10480

233

4352

Relevant Projects

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.

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.

Natural language processing Chatbot application using NLTK for text classification
In this NLP AI application, we build the core conversational engine for a chatbot. We use the popular NLTK text classification library to achieve this.

Build an Image Classifier for Plant Species Identification
In this machine learning project, we will use binary leaf images and extracted features, including shape, margin, and texture to accurately identify plant species using different benchmark classification techniques.

Predict Census Income using Deep Learning Models
In this project, we are going to work on Deep Learning using H2O to predict Census income.

Sequence Classification with LSTM RNN in Python with Keras
In this project, we are going to work on Sequence to Sequence Prediction using IMDB Movie Review Dataset​ using Keras in Python.

Predict Employee Computer Access Needs in Python
Data Science Project in Python- Given his or her job role, predict employee access needs using amazon employee database.

Customer Churn Prediction Analysis using Ensemble Techniques
In this machine learning churn project, we implement a churn prediction model in python using ensemble techniques.

Forecast Inventory demand using historical sales data in R
In this machine learning project, you will develop a machine learning model to accurately forecast inventory demand based on historical sales data.

Choosing the right Time Series Forecasting Methods
There are different time series forecasting methods to forecast stock price, demand etc. In this machine learning project, you will learn to determine which forecasting method to be used when and how to apply with time series forecasting example.