Uploaded September 2019 | Updated November 2026, 1 hour ago
The pipe operator %>% is a special symbol available after you load the dplyr package that lets you use the result of one function as the input to another function that comes after the pipe. Pipes essentially let you chain several functions together, creating a flow or pipeline of operations.
Link to the Kaggle Notebook code used for this video series:
kaggle.com/hamelg/dplyr-in-r
View the whole dplyr in R playlist here:
youtube.com/watch?v=THGFXV4RW8U&list=PLiC1doDIe9rC8RgWPAWqDETE-VbKOWfWl
dplyr cheat sheet from RStudio:
rstudio.com/wp-content/uploads/2015/02/data-wrangling-cheatsheet.pdf
dplyr documentation:
cran.r-project.org/web/packages/dplyr/dplyr.pdf
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
* Note for the pipe symbol above, I used the special character large greater than ">" instead of the standard greater than symbol because YouTube does not allow the normal symbol in the text description.
** Note: in the video you may notice a warning message when running the root mean squared error calculations. This happened because the vectors of dummy data weren't the same length! When performing math operations with vectors of unequal length, R will wrap back around to the beginning of the shorter vector as many times as necessary to match the length of the longer vector, which is why we still get a result (and only a warning instead of an error.).
#dplyr #rprogramming #datascience
The pipe operator %>% is a special symbol available after you load the dplyr package that lets you use the result of one function as the input to another function that comes after the pipe. Pipes essentially let you chain several functions together, creating a flow or pipeline of operations.
Link to the Kaggle Notebook code used for this video series:
kaggle.com/hamelg/dplyr-in-r
View the whole dplyr in R playlist here:
youtube.com/watch?v=THGFXV4RW8U&list=PLiC1doDIe9rC8RgWPAWqDETE-VbKOWfWl
dplyr cheat sheet from RStudio:
rstudio.com/wp-content/uploads/2015/02/data-wrangling-cheatsheet.pdf
dplyr documentation:
cran.r-project.org/web/packages/dplyr/dplyr.pdf
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
* Note for the pipe symbol above, I used the special character large greater than ">" instead of the standard greater than symbol because YouTube does not allow the normal symbol in the text description.
** Note: in the video you may notice a warning message when running the root mean squared error calculations. This happened because the vectors of dummy data weren't the same length! When performing math operations with vectors of unequal length, R will wrap back around to the beginning of the shorter vector as many times as necessary to match the length of the longer vector, which is why we still get a result (and only a warning instead of an error.).
#dplyr #rprogramming #datascience










![How to Remove a Column From a Data Frame in Pandas (Python)
This video shows 3 ways to remove columns from Data Frames in the Pandas library for Python.
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
import statsmodels.api as sm #(To access mtcars dataset)
mtcars = sm.datasets.get_rdataset(mtcars, datasets, cache=True).data
mtcars.head()
# Delete by column by name
del mtcars[cyl]
mtcars.head()
# Delete columns by name with df.drop()
mtcars = mtcars.drop([hp, carb], # Cols to drop
axis = 1) # 1 for columns
mtcars.head()
# Delete columns by index position with df.drop()
mtcars = mtcars.drop(mtcars.columns[[1,3]], # Index of cols to drop
axis = 1) # 1 for columns
mtcars.head()
* 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 Remove a Column From a Data Frame in Pandas (Python)](https://i.ytimg.com/vi/yRnoP-8zP2I/mqdefault.jpg)