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 do Data Analysis in a Pandas DataFrame?
Download the code for this recipe and access 1000+ recipes
## How to do Data Analysis in a Pandas DataFrame
def Kickstarter_Example_70():
print()
print(format('How to Data Analysis in a Pandas DataFrame','*^82'))
import warnings
warnings.filterwarnings("ignore")
# load libraries
import pandas as pd
# Create dataframe
raw_data = {'regiment': ['Nighthawks', 'Nighthawks', 'Nighthawks', 'Nighthawks', 'Dragoons', 'Dragoons', 'Dragoons', 'Dragoons', 'Scouts', 'Scouts', 'Scouts', 'Scouts'],
'company': ['1st', '1st', '2nd', '2nd', '1st', '1st', '2nd', '2nd','1st', '1st', '2nd', '2nd'],
'name': ['Miller', 'Jacobson', 'Ali', 'Milner', 'Cooze', 'Jacon', 'Ryaner', 'Sone', 'Sloan', 'Piger', 'Riani', 'Ali'],
'preTestScore': [4, 24, 31, 2, 3, 4, 24, 31, 2, 3, 2, 3],
'postTestScore': [25, 94, 57, 62, 70, 25, 94, 57, 62, 70, 62, 70]}
df = pd.DataFrame(raw_data, columns = ['regiment', 'company', 'name', 'preTestScore', 'postTestScore']); print(df)
# Create a groupby variable that groups preTestScores by regiment........
.
.
.
View the complete recipe
Get access to solved, end-to-end projects using such recipes - price increases on March 26
|