DataWrangling
The ultimate reference guide to data wrangling with Python and R
Install / Use
/learn @ben519/DataWranglingREADME
Check out Practice Probs for new pandas content and practice problems.
Anxious to start? Data Wrangling with pandas (Python) | Data Wrangling with data.table (R)
DataWrangling
Data science is 90% cleaning the data and 10% complaining about cleaning the data.
In the realm of data wrangling, data.table from R and pandas from Python dominate. This repo is meant to be a comprehensive, easy to use reference guide on how to do common operations with data.table and pandas, including a cross-reference between them as well as speed comparisons.
Files & Data
This repo consists of three primary directories:
The Python and R directories each contain three similarly structured files:
- wrangle.py / wrangle.R - has objectives and answers (for learning)
- wrangle_blank.py / wrangle_blank.R - has objectives only (for testing your skills)
- README.md (Python) / README.md (R) - has objectives, answers, and pandas-data.table cross references
The wrangle files make use of four datasets in the Data directory:
These datasets are small for illustrative purposes. If you'd like to test speed comparisons between pandas and data.table, you can use the make_data.R file to generate large versions of these datasets.
Call for contributions
I'd like to encourage contributions for this project - it's well suited for it. Also note that I'm much more comfortable using data.table than pandas, so it's likely I've done some suboptimal wrangling in pandas.
Contact
If you'd like to contact me regarding bugs, questions, or general consulting, feel free to drop me a line - bgorman519@gmail.com
Support
Found this free repo helpful? Show your support. Check out GormAnalysis Courses and buy some merch!

Related Skills
node-connect
341.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.4kCommit, push, and open a PR
