DBF (.dbf)
- Import fully supports the DBF format Version 4 and later.
Background & Context
-
- MIME types: application/dbf, application/dbase
- dBASE DBF data files.
- Legacy file format for storing and exchanging structured data.
- ASCII format.
- Native format of the dBASE database management application.
- Stores numerical datasets in a portable format.
- dBASE IV was introduced in 1988.
Import
- Import["file.dbf"] imports a DBF file, returning all datasets arranged as a table, with each column representing a dataset.
- DBF data is represented in the Wolfram Language by real or integer numbers, strings, Boolean values True and False and DateList specifications.
- Import["file.dbf",elem] imports the specified element from a DBF file.
- Import["file.dbf",{elem,suba,subb,…}] imports a subelement.
- The import format can be specified with Import["file","DBF"] or Import["file",{"DBF",elem,…}].
- See the following reference pages for full general information:
-
Import import from a file CloudImport import from a cloud object ImportString import from a string ImportByteArray import from a byte array
Import Elements
- General Import elements:
-
"Elements" list of elements and options available in this file "Summary" summary of the file "Rules" list of rules for all available elements - Data representation elements:
-
"Data" datasets arranged as a table "EventSeries" table data as an EventSeries "LabeledData" datasets given as a list of rules "Tabular" table data as a Tabular object "TimeSeries" table data as a TimeSeries - Import uses the "Data" element by default.
- Import["file.dbf"] reads all datasets and returns them as a table.
- Import["file.dbf","LabeledData"] imports the entire file and returns an expression of the form {a1->col1,a2->col2,…}, where the ai are the table headings.
- Meta-information elements:
-
"Labels" dataset names given as a list of strings - The DBF format can store labels of length 10 or shorter.
Examples
open all close allBasic Examples (1)
Get the list of available Import formats:
Import[ "ExampleData/planets.dbf", "Elements"]Import[ "ExampleData/planets.dbf" ] // TableFormImport the column labels as a list of strings:
Import[ "ExampleData/planets.dbf", "Labels"]Read this file as a list of labeled datasets, giving a rule for each column:
Import[ "ExampleData/planets.dbf", "LabeledData"]Scope (3)
Import data as a Tabular object:
Import[ "ExampleData/planets.dbf" , "Tabular"]Import data as an EventSeries object:
Import[ "ExampleData/planets.dbf" , "EventSeries"]Import data as a TimeSeries object:
Import[ "ExampleData/planets.dbf" , "TimeSeries"]Import Options (1)
"TimeColumn" (1)
By default, the time column is selected automatically for "TimeSeries" and "EventSeries" elements:
Import[ "ExampleData/planets.dbf", "TimeSeries"]Use the "TimeColumn" option to specify the time column:
Import[ "ExampleData/planets.dbf", "TimeSeries", "TimeColumn" -> "DIAM/KM"]History
Introduced in 2007 (6.0) | Updated in 2025 (14.3) ▪ 2026 (15.0)