Hi,
Thanks for registering with ProjectPro Recipes - get just-in-time learning and release your projects faster with "ready-to-use" Data-Science code snippets.Â
Find below a recipe we launched recently -Â
How to apply arithmetic operations on a Pandas DataFrame?
Download the code for this recipe and access 1000+ recipes
## How to apply arithmatic operations on a Pandas DataFrame
def Kickstarter_Example_72():
print()
print(format('How to apply arithmatic operations on a Pandas DataFrame','*^82'))
import warnings
warnings.filterwarnings("ignore")
# load libraries
import pandas as pd
import numpy as np
# Create a dataframe
data = {'name': ['Jason', 'Molly', 'Tina', 'Jake', 'Amy'],
'year': [2012, 2012, 2013, 2014, 2014],
'reports': [4, 24, 31, 2, 3],
'coverage': [25, 94, 57, 62, 70]}
df = pd.DataFrame(data, index = ['Cochice', 'Pima', 'Santa Cruz', 'Maricopa', 'Yuma'])
print(); print(df)
# Create a capitalization lambda function
.
.
.
View the complete recipe
Get access to solved, end-to-end projects using such recipes - price increases on March 26
|