100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace
Programming

DataFrames.jl Basics

An introduction to tabular data manipulation in Julia with DataFrames.jl — creating, inspecting, filtering, grouping, and joining data tables.

Performance & PackagesBeginner10 min readJul 10, 2026
Analogies

Introducing DataFrames.jl

DataFrames.jl is Julia's primary package for working with tabular data — think of a table with named columns, similar to a spreadsheet, a SQL table, or Python's pandas DataFrame — where each column is stored internally as its own typed vector, allowing operations on a single column to run at full compiled speed without boxing. Because Julia's type system flows naturally into DataFrames.jl, columns retain concrete element types like Int64, Float64, or String rather than a generic 'object' type, which is part of why DataFrames.jl operations tend to be significantly faster than dynamically-typed equivalents once your code is written to respect column types.

🏏

Cricket analogy: A scorebook with a dedicated column for runs, another for balls faced, and another for player names, each column tracked separately and consistently, is exactly how a DataFrame stores data — the runs column stays numeric throughout, so summing it never requires checking each entry's type.

Creating and Inspecting DataFrames

A DataFrame can be constructed directly from named vectors passed as keyword arguments, from a vector of NamedTuples, or by reading a file with CSV.jl via CSV.read(path, DataFrame); once created, first(df, 5) or last(df, 5) show a preview, names(df) lists column names, describe(df) gives per-column summary statistics like mean, min, max, and missing counts, and size(df) returns the (rows, columns) tuple. Missing data is represented with Julia's built-in missing value rather than NaN or a sentinel, and columns containing it get an element type like Union{Missing, Float64}, which forces you to explicitly handle missingness with functions like skipmissing() or coalesce() before most numeric aggregations will work.

🏏

Cricket analogy: A curator previewing the first five entries of a massive historical scorecard archive before diving in, rather than reading every match, mirrors first(df, 5) giving a quick preview of a DataFrame without loading the analyst's full attention onto every row.

julia
using DataFrames, CSV

# Construct directly from named vectors
df = DataFrame(name = ["Alice", "Bob", "Carol"],
               age  = [29, 34, 41],
               city = ["Chennai", "Pune", missing])

names(df)          # ["name", "age", "city"]
size(df)            # (3, 3)
first(df, 2)         # preview first two rows
describe(df)         # per-column stats, including missing counts

# Reading from CSV directly into a DataFrame
sales = CSV.read("sales.csv", DataFrame)
mean(skipmissing(df.age))   # 34.666..., ignoring any missing ages

Selecting, Filtering, and Transforming Data

Individual columns are accessed with dot syntax (df.age) or bracket indexing (df[:, :age]), and DataFrames.jl's convention is that df.age or df[!, :age] returns the actual underlying column vector without copying (mutations affect the original), while df[:, :age] returns a fresh copy — a distinction that matters a great deal in memory-sensitive code. Row filtering is done with subset(df, :age => x -> x .> 30) or the shorthand filter(row -> row.age > 30, df), and column transformation uses select or transform with a Pair syntax like :age => (x -> x .+ 1) => :age_next_year, which reads naturally as 'take this column, apply this function, name the result this'.

🏏

Cricket analogy: Handing a scorer the actual master scorebook to mark up live lets edits reflect immediately in the official record, while handing a photocopy to a journalist lets them scribble notes without touching the original — df[!, :col] is the master scorebook, df[:, :col] is the photocopy.

df[!, :col] and df.col return the underlying column vector by reference, so df.age .+= 1 actually mutates the DataFrame's data in place — this is fast and often desired, but assigning that reference elsewhere (x = df.age) means later mutating x will silently mutate df too. Use df[:, :col] (with a colon, not an exclamation mark) whenever you need an independent copy.

Grouping and Aggregating with groupby and combine

The split-apply-combine pattern is implemented with groupby(df, :category), which produces a GroupedDataFrame partitioning rows by the distinct values in one or more key columns without copying data, followed by combine(gdf, :value => mean => :avg_value) which applies an aggregation function to each group and stitches the results back into a single summary DataFrame. This two-step pattern — groupby then combine — is the idiomatic replacement for what SQL's GROUP BY or pandas' .groupby().agg() would do, and combine can apply multiple named aggregations at once by passing several column => function => newname pairs.

🏏

Cricket analogy: Sorting an entire season's ball-by-ball data into separate piles by bowler, then computing each bowler's average economy rate from their own pile, is exactly the split-apply-combine pattern — groupby does the sorting into piles, combine computes and stitches the per-bowler averages back into one table.

julia
using DataFrames, Statistics

df = DataFrame(region = ["North", "South", "North", "South", "North"],
               revenue = [120.0, 95.0, 140.0, 80.0, 110.0])

gdf = groupby(df, :region)
summary = combine(gdf, :revenue => mean => :avg_revenue,
                        :revenue => sum  => :total_revenue)

# summary now has one row per region with avg_revenue and total_revenue columns

# Joining two tables on a shared key column
customers = DataFrame(id = [1, 2, 3], name = ["Alice", "Bob", "Carol"])
orders    = DataFrame(id = [1, 1, 2], amount = [50.0, 25.0, 75.0])
innerjoin(customers, orders, on = :id)   # rows only for customers with orders

Joining DataFrames

DataFrames.jl provides SQL-style join functions — innerjoin, leftjoin, rightjoin, outerjoin, semijoin, and antijoin — all taking an on keyword specifying the shared key column(s) to match rows between two tables. innerjoin(a, b, on=:id) keeps only rows where the key exists in both tables, leftjoin(a, b, on=:id) keeps every row from a and fills unmatched columns from b with missing, and when column names overlap but aren't the join key, DataFrames.jl automatically renames them with _1/_2 suffixes (or you can specify makeunique=true) to avoid silent collisions.

🏏

Cricket analogy: Matching a list of registered players against a list of match-day availability, keeping only names that appear on both lists, mirrors innerjoin keeping only rows whose key matches in both tables, while keeping the full squad list and marking absentees as unavailable mirrors leftjoin filling unmatched rows with missing.

Join cheat sheet: innerjoin keeps only matched rows; leftjoin keeps all rows from the first table; rightjoin keeps all rows from the second table; outerjoin keeps all rows from both; semijoin filters the first table to rows that have a match (like innerjoin but keeps only the first table's columns); antijoin filters the first table to rows with NO match — useful for finding 'customers with no orders' style queries.

  • DataFrames.jl stores tabular data with each column as its own typed vector, giving compiled-speed operations rather than generic 'object' columns.
  • Construct DataFrames from named vectors, NamedTuples, or CSV.read(path, DataFrame); inspect with first(), describe(), names(), and size().
  • Missing data uses Julia's built-in missing value; handle it explicitly with skipmissing() or coalesce() before aggregating.
  • df.col / df[!, :col] returns the actual column by reference (fast, mutates in place); df[:, :col] returns an independent copy.
  • subset() and filter() select rows; select() and transform() with Pair syntax (:col => f => :newname) create or modify columns.
  • groupby() followed by combine() implements the split-apply-combine pattern, Julia's equivalent of SQL's GROUP BY.
  • innerjoin, leftjoin, rightjoin, outerjoin, semijoin, and antijoin provide SQL-style table joins keyed on the on argument.

Practice what you learned

Was this page helpful?

Topics covered

#Programming#JuliaStudyNotes#DataFramesJlBasics#DataFrames#Introducing#Creating#Inspecting#StudyNotes#SkillVeris#ExamPrep

Frequently Asked Questions

21 categories · pick one to explore

Where can I get free study notes for programming and tech subjects?
SkillVeris offers completely free study notes covering programming and tech subjects, with no signup fees or paywalls. The notes are structured by course and topic, written for quick understanding, and enriched with the Learn Through Hobbies analogy method, so you can revise concepts through cricket, music, gaming, cooking and more.
Are SkillVeris study notes good for exam revision?
Yes, the study notes are designed for efficient revision: each topic answers its heading immediately, keeps explanations concise, and links to related glossary terms and cheat sheets. Students preparing for university exams or certification tests use them as quick revision notes because they distil concepts without the padding of full textbooks.
What subjects do the free study notes cover?
The study notes span the platform's main domains, including AI and machine learning, Python and programming, web development, DevOps, cloud, security and databases. Coverage mirrors the 37 live courses, so notes exist for the topics you are actually studying, and new note sets are added as courses launch.
How are SkillVeris study notes different from regular textbooks?
The notes are answer-first, concise and free, whereas textbooks are long and often expensive. Each section explains one concept directly, then reinforces it through selectable hobby analogies like cricket or cooking. Notes also cross-link to the glossary, blog and cheat sheets, letting you jump to related material instantly instead of flipping pages.
Can I use the developer study material without creating an account?
The study notes are free to access, and SkillVeris does not charge anything for its developer study material at any point. Browsing notes is straightforward from the Study Notes section, and if you want progress tracking, certificates and AI Mentor conversations tied to your learning, a free account unlocks those extras.
Do the study notes explain concepts with analogies?
Yes, this is a signature SkillVeris feature. Study notes use the Learn Through Hobbies method, explaining technical concepts through analogies from twelve domains including cricket, music, gaming, photography, travel, movies, fitness, chess, cooking, finance, business and sports. You can switch the analogy domain instantly to whichever hobby makes the concept click.
Are the revision notes suitable for last-minute exam preparation?
Yes, revision notes on SkillVeris work well for last-minute preparation because every section states the answer in its first sentences, so skimming is genuinely effective. Pair them with the relevant cheat sheet for formulas and syntax, and use the glossary for any unfamiliar term you meet while cramming.
Is there free study material for AI and machine learning?
Yes, SkillVeris provides free study notes across its AI and ML catalogue, covering Python for AI, deep learning frameworks like PyTorch and TensorFlow, Hugging Face Transformers, Large Language Models, RAG, AI agents and MLOps. All of it is free, making it a strong resource for Indian students and global learners alike.
Can beginners understand the study notes, or are they for experts?
Beginners can absolutely use them. The notes are written in plain language, define terms as they appear, and lean on hobby analogies to make abstract ideas concrete. Difficulty scales with the underlying course level, so beginner-course notes stay gentle while advanced-course notes go deeper, and the glossary supports you throughout.
How do study notes connect with SkillVeris courses?
Study notes are organised by course and topic, so they map directly to the structured courses and their 24–40-lesson curriculum. Many learners study a lesson first, then use the matching notes for revision before module assessments and the final exam, where 80 percent is required to pass and earn the certificate.
Are there study notes for Python specifically?
Yes, Python is well covered through notes tied to the Python-focused courses, including Python for AI and ML. Topics span fundamentals through applied machine learning usage. You can reinforce the notes with Python practice in Code Lab, which runs code in your browser with no installation required.
Do the study notes include code examples?
Yes, study notes include code examples wherever a concept is best shown in code, alongside explanations, key points and analogies. Reading a snippet in the notes and then reproducing it yourself in Code Lab is an effective loop, since Code Lab lets you run code in the browser across six languages.
How often is new study material added to SkillVeris?
Study material grows alongside the course catalogue. Whenever new courses join the platform's 37 live courses, matching study notes, glossary entries and cheat sheets are added so the resources stay in sync. Existing notes are also refined over time, so it is worth revisiting topics you studied earlier.
Can I use SkillVeris notes to prepare for technical interviews?
Yes, the notes make excellent interview revision because they compress each concept into direct, answer-first explanations, which mirrors how you should answer interview questions. Combine them with the SkillVeris interview questions feature, which includes readiness scoring, to test whether your revision has actually made you interview-ready.
Are the study notes mobile-friendly for studying on the go?
Yes, the study notes are built to load fast and read comfortably on mobile devices, so you can revise during a commute or between classes. Sections are short and answer-first, which suits small screens, and analogy switching works on mobile too, letting you study anywhere without carrying books.
What is the difference between study notes and cheat sheets?
Study notes explain concepts in depth with context, examples and analogies, making them ideal for learning and revision. Cheat sheets are compact quick-reference summaries of syntax, commands and key facts, ideal once you already understand a topic. Most learners study the notes first, then keep the cheat sheet handy while coding.
Do study notes help if I am stuck on a course lesson?
Yes, reading the matching study notes often clarifies a lesson because the same concept is explained from a different angle, frequently with a different analogy. If you are still stuck, ask the AI Mentor, which answers 24/7 at Quick, Detailed or Deep-dive depth until the idea genuinely makes sense.
Is there free study material for DevOps and cloud topics?
Yes, SkillVeris carries free study notes for DevOps and cloud topics as part of its coverage across 37 live courses. The material suits learners following the DevOps Engineer or Cloud Engineer paths, and it links to related glossary terms and cheat sheets so you can revise the whole toolchain in one place.
Can school or college students in India use these notes for projects?
Yes, students across India and worldwide use SkillVeris notes for coursework, projects and exam preparation, and everything is free, which matters for student budgets. The notes explain concepts clearly enough to cite in project reports, and Code Lab lets you prototype the project code directly in your browser.
How should I combine study notes with other SkillVeris resources?
A proven loop: learn from a course lesson, revise with the matching study notes, look up unfamiliar terms in the glossary, keep the cheat sheet open while practising in Code Lab, and quiz yourself with interview questions. The AI Mentor fills any remaining gaps 24/7, at whatever depth you need.

What Learners Say

Real journeys from the SkillVeris community — swipe for more.

SkillVeris taught me Python through Cricket. Now I’m building real projects and feeling confident!
Arjun S. · B.Tech Student
The best platform for hobby-based learning. Concepts finally stick.
Priya R. · Data Analyst
I went from zero coding to a portfolio of projects — all by learning through my love for gaming. Landed my first internship!
Kabir M. · CS Undergraduate
Trending Topics50 popular tags — tap to explore
Trending CoursesAll 37 free courses — tap to browse