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

Mercari Price Suggestion Challenge Data Science Project
Data Science Project in Python- Build a machine learning algorithm that automatically suggests the right product prices.

Perform Time series modelling using Facebook Prophet
In this project, we are going to talk about Time Series Forecasting to predict the electricity requirement for a particular house using Prophet.

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.

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.

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.

Build a Collaborative Filtering Recommender System in Python
Use the Amazon Reviews/Ratings dataset of 2 Million records to build a recommender system using memory-based collaborative filtering in Python.

Loan Eligibility Prediction using Gradient Boosting Classifier
This data science in python project predicts if a loan should be given to an applicant or not. We predict if the customer is eligible for loan based on several factors like credit score and past history.

Topic modelling using Kmeans clustering to group customer reviews
In this Kmeans clustering machine learning project, you will perform topic modelling in order to group customer reviews based on recurring patterns.

Data Science Project on Wine Quality Prediction in R
In this R data science project, we will explore wine dataset to assess red wine quality. The objective of this data science project is to explore which chemical properties will influence the quality of red wines.

Zillow’s Home Value Prediction (Zestimate)
Data Science Project in R -Build a machine learning algorithm to predict the future sale prices of homes.