Uploaded September 2019 | Updated November 2026, 1 hour ago
Summarizing data with basic descriptive statistics is an important part of both data exploration and reporting. In this lesson we cover how to generate statistics that measure the center and spread of variables including the mean, median, mode, variance and standard deviation.
** Note: I made a mistake in this video. The discussion of Kurtosis in the video is not accurate. Kurtosis is actually a measure of how much data is in the tails of a distribution v.s. the center which often overlaps with the idea of "peakedness", but it is not the same thing! YouTube doesn't allow annotations anymore so I cannot post a correction within the video itself; see Peter Westfall's comment below for more info!
**
This is lesson 21 of a 30-part introduction to the R programming language for data analysis and predictive modeling. Link to the code notebook below:
Intro to R: Descriptive Statistics
kaggle.com/hamelg/intro-to-r-part-21-descriptive-statistics
This guide does not assume any prior exposure to R, programming or data science. It is intended for beginners with an interest in data science and those who might know other programming languages and would like to learn R.
I will create the videos for this guide such that you should be able to learn a lot just watching on YouTube, but to get the most out of the guide, it is recommended that you create a Kaggle account so that you can fork and edit each lesson so that you can follow along and run code yourself.
Follow DataDaft on social media for news and updates:
Twitter: twitter.com/DataDaft
Join the DataDaft Discord to discuss all things data science:
discord.gg/ZS2yPNw
Introduction to R Playlist:
youtube.com/playlist?list=PLiC1doDIe9rDjk9tSOIUZJU4s5NpEyYtE
Summarizing data with basic descriptive statistics is an important part of both data exploration and reporting. In this lesson we cover how to generate statistics that measure the center and spread of variables including the mean, median, mode, variance and standard deviation.
** Note: I made a mistake in this video. The discussion of Kurtosis in the video is not accurate. Kurtosis is actually a measure of how much data is in the tails of a distribution v.s. the center which often overlaps with the idea of "peakedness", but it is not the same thing! YouTube doesn't allow annotations anymore so I cannot post a correction within the video itself; see Peter Westfall's comment below for more info!
**
This is lesson 21 of a 30-part introduction to the R programming language for data analysis and predictive modeling. Link to the code notebook below:
Intro to R: Descriptive Statistics
kaggle.com/hamelg/intro-to-r-part-21-descriptive-statistics
This guide does not assume any prior exposure to R, programming or data science. It is intended for beginners with an interest in data science and those who might know other programming languages and would like to learn R.
I will create the videos for this guide such that you should be able to learn a lot just watching on YouTube, but to get the most out of the guide, it is recommended that you create a Kaggle account so that you can fork and edit each lesson so that you can follow along and run code yourself.
Follow DataDaft on social media for news and updates:
Twitter: twitter.com/DataDaft
Join the DataDaft Discord to discuss all things data science:
discord.gg/ZS2yPNw
Introduction to R Playlist:
youtube.com/playlist?list=PLiC1doDIe9rDjk9tSOIUZJU4s5NpEyYtE




![How To Use map() In Pandas (Python)
↓ Code Available Below! ↓
This video shows how to map functions to columns of pandas data frames using .map(). The .map() function operates on pandas series and applies a function or dictionary mapping to each element of the series. Since the columns of data frames are series, it provides a convenient way of generating new columns by applying functions or correspondences elementwise on existing columns.
If you find this video useful, like, share and subscribe to support the channel!
► Subscribe: https://www.youtube.com/c/DataDaft?sub_confirmation=1
Code used in this Python Code Clip:
import pandas as pd
data = pd.DataFrame({power_level: [12000, 16000, 4000, 1500, 3000,
2000, 1600, 2000],
uniform color: [orange, blue, black, orange,
purple, green, orange, orange],
species: [saiyan,saiyan,saiyan,half saiyan,
namak,human,human,human]},
index = [Goku,Vegeta, Nappa,Gohan,
Piccolo,Tien,Yamcha, Krillin])
data
# Use .map() to apply a function to a pandas Series
# Data Frame columns are Series
def my_function(x):
if x > 10000:
return(high)
if x > 2000:
return(med)
return (low)
data[power_level].map(my_function)
# To map Series values based on key: value correspondence
# Pass a mapping dictionary to .map()
correspondence = {saiyan: alien,
namak:alien,
human:earthling,
half saiyan: earthling}
data[species].map(correspondence)
* Note: YouTube does not allow greater than or less than symbols in the text description, so the code above will not be exactly the same as the code shown in the video! I will use Unicode large < and > symbols in place of the standard sized ones. .
⭐ Kite is a free AI-powered coding assistant that integrates with popular editors and IDEs to give you smart code completions and docs while you’re typing. It is a cool application of machine learning that can also help you code faster! Check it out here: https://www.kite.com/get-kite/?utm_medium=referral&utm_source=youtube&utm_campaign=datadaft&utm_content=description-only How To Use map() In Pandas (Python)](https://i.ytimg.com/vi/uM4_SY4mXj4/mqdefault.jpg)
![How to Use enumerate() in Python
Code available in comment below! This video shows the basics of how to use enumerate() in Python. enumerate() is useful for looping through data structures like lists while having access to each index and the corresponding value for each iteration of the loop.
characters = [Krillin,Goku, Vegeta, Gohan, Piccolo]
# enumerate() returns a sequence of (index, item) tuples
list(enumerate(characters))
# Use enumerate() in a for loop to get an item and its index
for index, character in enumerate(characters):
print(index, character)
# Why might you want to use enumerate?
# Example: store index positions of duplicate items
characters = [Krillin,Goku, Goku, Gohan, Piccolo,
Krillin,Goku, Vegeta, Gohan, Piccolo,
Piccolo,Goku, Vegeta, Goku, Piccolo]
character_map = {character:[] for character in set(characters)}
print(character_map)
# Use enumerate to store the index for each occurence
for index, character in enumerate(characters):
character_map[character].append(index)
character_map How to Use enumerate() in Python](https://i.ytimg.com/vi/uPT-LkYSP_o/mqdefault.jpg)
![Naruto Power Levels Over Time (1 Second = 1 Episode)
Naruto power levels from Naruto 1 through Shippuden 500. Every episode is displayed for approximately 1 second. Note that the video only shows power levels relevant to the current timeline (does not include flashbacks) and it skips long spans of filler episodes. Also note that the video shows a character’s current power level. This means a character that is strong but exhausted, injured or suppressing his power might appear lower than expected.
The concept of “power levels” are not a part of Naruto canon like they are in Dragonball, but I thought it would be fun to make a power level plot video similar to my Dragonball video, showing the flow of the story of Naruto over time as expressed through rough character power levels. Many viewers have expressed interest in such a video.
It is not possible to make a direct translation from Dragonball power levels to Naruto, since the concept of strength in the two shows is different. In Dragonball, power is fairly easy to quantify: the stronger a character is, the more speed, durability and more destructive power they have. In Naruto, power is more nuanced. Fights are more strategic and often based upon techniques like ninjutsu and genjutsu instead of brute force, DBZ style taijutsu and energy projection. The power levels here are meant to roughly fit into the DBZ conception of power level, but Naruto characters will generally have lower durability and raw destructive power than DBZ characters at similar power levels, while having more techniques and abilities.
Also note that one character having a higher power level than another does not necessarily mean they would win a fight. Certain characters counter others with abilities and some characters are able to fight well above their power level due to strategy and preparation. Some characters are capable of drastically raising their power levels for short bursts (chidori, rasengan, opening gates, etc.) which allows them to take down opponents with higher base power levels.
General guide to Naruto power level tiers in this video:
Power Level 0: Unconscious/Dead
Power Level 1-10: Normal Person
Power Level 10-100: Genin Level
Power Level 100-200: Chunin Level
Power Level 200-400: Jounin Level
Power Level 400-800: Jounin+ Level (Strong Jounin)
Power Level 800-1500: Kage Level
Power Level 1500-4000: Kage+ Level (Strong Kage)
Power Level 4000-10000: Demigod Level
Power Level 10000+: God Level
About the video:
Data: Custom hand-made data set
Plotting: flourish
Music:
1. Naruto - Strong And Strike (https://www.youtube.com/watch?v=57stJGfNN-I)
*Update* This song has been replaced with an audio library track due to a Content ID claim that blocked the video.
2. Kana Boon – Silhouette (https://www.youtube.com/watch?v=FswTx00PeOU&ab_channel=TreckMusicRandomTreckMusicRandom)
3. Track: Naruto Main Theme Remix (No Copyrights) Naruto Shippuden Anime Music, OST & Soundtrack [NCFS UPDATE]
Music provided by No Copyrights Free Sounds
Watch: https://youtu.be/EPhuRrHLPKI
Free Download / Stream: https://tii.ai/nN43 Naruto Power Levels Over Time (1 Second = 1 Episode)](https://i.ytimg.com/vi/uUfT7RtmLkk/mqdefault.jpg)



