CSV Tools

Sample Stata File

A downloadable sample Stata .dta file with 30 fictional employee records in the modern version 118 format — ready for pandas, R haven, and Stata itself.

Data Stata Binary format

sample-employees.dta

Data Preview

30 rows × 7 columns
1nameemaildepartmentrolesalarystart_dateoffice
2Marcus Chen[email protected]EngineeringSenior Software Engineer1550002019-03-15San Francisco
3Priya Sharma[email protected]EngineeringStaff Engineer1780002019-06-01San Francisco
4David Kim[email protected]EngineeringSoftware Engineer1250002021-01-10New York
5Rachel Torres[email protected]EngineeringEngineering Manager1680002020-02-20San Francisco
6James Okafor[email protected]EngineeringJunior Developer920002024-06-15Austin
7Lena Vogt[email protected]EngineeringDevOps Engineer1400002022-04-01New York
8Amir Patel[email protected]EngineeringBackend Engineer1320002023-01-09London
9Sofia Lindberg[email protected]DesignLead Designer1450002019-09-12New York
10Carlos Rivera[email protected]DesignUX Designer1120002021-07-20San Francisco
11Hannah Becker[email protected]DesignUI Designer1050002022-11-01London
12Yuki Tanaka[email protected]DesignProduct Designer1180002023-03-14San Francisco
13Olivia Martin[email protected]MarketingVP of Marketing1650002019-04-22New York
14Ethan Brooks[email protected]MarketingContent Strategist950002021-10-05Austin
15Nina Kowalski[email protected]MarketingSEO Specialist880002022-08-15New York
16Daniel Ochoa[email protected]MarketingMarketing Analyst910002023-05-20Austin
17Samira Hassan[email protected]MarketingSocial Media Manager820002024-01-08London
18Tyler Washington[email protected]SalesSales Director1580002019-11-30New York
19Jessica Huang[email protected]SalesAccount Executive1100002020-06-14San Francisco
20Ryan O'Brien[email protected]SalesAccount Executive1050002021-03-22London
21Fatima Al-Rashid[email protected]SalesSales Development Rep720002023-09-01Austin
22Kevin Dupont[email protected]SalesSolutions Engineer1350002022-01-17San Francisco
23Megan Stewart[email protected]SalesAccount Manager980002024-03-11New York
24Laura Chen[email protected]HRHR Director1480002019-08-05New York
25Brian Nakamura[email protected]HRHR Business Partner1050002020-12-01San Francisco
26Chloe Dubois[email protected]HRRecruiter780002022-05-23London
27Angela Moretti[email protected]HRPeople Operations850002023-07-10Austin
28Isaac Fernandez[email protected]EngineeringFrontend Engineer1280002022-09-19New York
29Sarah Mitchell[email protected]DesignDesign Systems Lead1380002020-04-06San Francisco
30Omar Farah[email protected]EngineeringQA Engineer950002024-02-12London
31Natalie Park[email protected]MarketingGrowth Manager1080002021-11-28San Francisco

Schema

Field Type Description
name string Employee full name.
email string Work email address on the fictional example.com domain.
department string One of Engineering, Sales, Marketing, HR, or Design.
role string Job title within the department.
salary int32 Annual salary in USD, stored as a Stata long (32-bit integer).
start_date string Hire date as an ISO 8601 string (YYYY-MM-DD), not a Stata date value.
office string Office location — San Francisco, New York, Austin, or London.

About the Stata Format

Stata’s .dta is the native dataset format of the Stata statistical package, ubiquitous in economics, epidemiology, and survey research. This sample uses format version 118 — the dialect introduced with Stata 14 — which is the one to standardize on: it stores strings as UTF-8 (older versions were effectively Latin-1) and supports large observation counts. It was written by pandas.DataFrame.to_stata(..., version=118).

The format is binary and self-describing: a header carries the observation count and variable metadata, followed by fixed-layout data records. Two Stata-specific conventions show up even in a file this small:

  • Variable name rules. Stata names are limited to 32 characters, may contain only letters, digits, and underscores, and cannot start with a digit. The employee headers (name, start_date, …) already comply, so no renaming occurred — but a CSV header like 2024 salary or first-name would be rewritten on export, which is a common source of column-name drift between Stata and everything else.
  • Typed columns. salary is stored as a Stata long (32-bit integer), and each string column is a fixed-width str# type sized to its longest value. Unlike CSV, the types travel with the file. start_date is kept as an ISO 8601 string rather than a Stata internal date (days since 1960-01-01) so it reads identically in pandas, R, and Stata without format directives.

What this file omits is also informative: real research .dta files usually carry variable labels, value labels (integer codes mapped to text), and missing-value sentinels (., .a.z). This sample has none, making it a clean baseline before testing those features with your own data.

To open it, use pandas.read_stata(), R’s haven::read_dta(), or Stata 14+ — or follow the DTA to CSV guide for every free conversion route, including no-code options. The Parquet and Feather siblings have in-browser converters if you need CSV output today.

FAQ

4 questions
How do I open a .dta file without Stata?
In Python: pandas.read_stata('sample-employees.dta'). In R: haven::read_dta('sample-employees.dta'). Both read version 118 files and preserve column types. Stata 14 or newer opens it directly with the use command.
Why is there no Stata converter on this site?
A browser-based Stata to CSV converter is not live yet, but the DTA to CSV guide at /dta-to-csv/ walks through every free conversion route — no Stata license needed. The same 30 records are also available on this page's siblings in formats the site does convert — Parquet at /sample-data/parquet/ and Feather at /sample-data/feather/ both have working browser converters.
Does downloading this file send any data to a server?
No. The sample is a static file served directly by the site — nothing is uploaded, processed, or inspected. The related tools linked below run entirely in your browser too.
Is the employee data real?
No. All 30 records are fictional, and every email address uses the reserved example.com domain, so the file is safe for demos, tests, and documentation.

Work With Stata Files 5 tools