Sample CSV Files for Data Analysis
Download Sample File
Free test file, safe content, instant download.
523a2ccba048dd814126a423...Every data analysis course hits the same wall: you need realistic data to practice on, but real datasets are either locked behind licenses, contain personal information you cannot legally redistribute, or are so clean they teach nothing. These four CSV datasets were generated by us for exactly this gap — realistic shapes, zero real people.
The set covers the full analysis workflow: a tidy sales table for straightforward groupby and aggregation, a deliberately messy survey for cleaning drills (missing values, mixed date formats, duplicates, inconsistent casing), a two-year monthly time series with trend and seasonality for plotting and forecasting, and a 1,000-row employee table for joins, pivots, and window functions.
Everything is synthetic and released under CC0 — no scraped data, no real PII, no attribution required. Load any file straight into pandas, Excel, R, Google Sheets, Power BI, or DuckDB and start practicing.
File Information
- Tidy data
- sample-sales-data.csv — 72 rows, 6 months of e-commerce sales (date, region, category, channel, units, price)
- Messy data
- sample-survey-messy.csv — missing values, 4 date formats, duplicates, NaN, casing chaos
- Time series
- sample-time-series.csv — 24 months of visitors/signups/revenue/churn with trend + seasonality
- Bigger table
- sample-employees-1000.csv — 1,000 rows for groupby, pivots, joins, salary analysis
- License
- CC0 — 100% synthetic data generated by us, no real people or companies
- Best for
- pandas, Excel, R, Google Sheets, Power BI, DuckDB, teaching
How to Use This CSV Test File
- 1Load the tidy dataset: pd.read_csv('sample-sales-data.csv') then revenue by region: df.assign(revenue=df.units*df.unit_price_usd).groupby('region').revenue.sum().
- 2Cleaning drill: load sample-survey-messy.csv, deduplicate rows, normalize the date column, and decide how to handle missing satisfaction scores.
- 3Time-series drill: plot visitors by month in sample-time-series.csv, decompose trend vs. seasonality, and compute month-over-month growth.
- 4HR drill: in sample-employees-1000.csv, pivot average salary by department and country, then filter years_experience > 5.
Frequently Asked Questions
- Is this real data?
- No — and that is deliberate. Every row was generated programmatically with a fixed random seed: names are drawn from common given/family name pools, numbers follow realistic distributions. No real people, companies, or transactions exist in these files, which is exactly why you can publish your analysis, use them in a course, or ship them in a workshop without privacy or licensing review.
- Why would I want a messy CSV on purpose?
- Because cleaning is most of the real job. The messy survey file contains the classic dirty-data patterns you will meet in every real project: missing values, four different date formats, an exact duplicate row, inconsistent yes/YES/No casing, and a NaN masquerading as a number. Practicing detection and repair on a file where the ground truth is knowable is the fastest way to build the habit.
- Which file is best for learning pandas?
- Start with sample-sales-data.csv (small enough to eyeball, rich enough to group and aggregate), then move to sample-employees-1000.csv for pivots and multi-column operations. Finish with the messy survey to practice the cleaning workflow: df.isna().sum(), df.drop_duplicates(), and pd.to_datetime(errors='coerce').
- Can I use these datasets in my course, blog, or book?
- Yes — CC0 means no attribution and no restrictions, including commercial training material. A link back is appreciated but never required.
- What delimiter and encoding do the files use?
- Standard comma-separated values with a header row, UTF-8 without BOM, LF line endings — the most portable combination for pandas, Excel, R, and Google Sheets.
Related Sample Files
Need a different size or format?
Use our free Generator to create custom test files in any format and size — right in your browser, no upload needed.
Try Our Generator