Flat file format for multi-tabular data storage using ASCII separator characters.
Project description
ASCII Separated Data
Flat file format for multi-tabular data storage using ASCII separator characters
Flat/Text file (e.g. comma-separated, tab-separated, fixed-width, etc.) is by far the most common file format used for tabular data by data analysts in any industry. Flat files store structured data using specific column/row separator like comma, newline and data qualifier characters like double quotation.
There are few major issues present in the existing flat file formats: The separator and qualifier characters are commonly present in the data itself which makes it difficult to parse the file. Also, multiple tables are not supported by most of the existing file formats.
.asd flat file format/structure eliminates above listed and other issues in existing flat file formats. The presented file format uses existing ASCII separator characters (which are almost obsolete considering present day usage and may not appear in actual data) instead of common characters like comma, tab, pipe, etc.
This improves the quality and efficiency of data processing and allows multi-tabular data in a single flat file. I have named it ASCII Separated Data (ASD) with .asd as file extension.
Characters used
| DEC | OCT | HEX | BIN | Symbol | Description |
|---|---|---|---|---|---|
| 1 | 1 | 01 | 00000001 | SOH | Start of Heading |
| 2 | 2 | 02 | 00000010 | STX | Start of Text |
| 3 | 3 | 03 | 00000011 | ETX | End of Text |
| 28 | 34 | 1C | 00011100 | FS | File Separator |
| 29 | 35 | 1D | 00011101 | GS | Group Separator |
| 30 | 36 | 1E | 00011110 | RS | Record Separator |
| 31 | 37 | 1F | 00011111 | US | Unit Separator |
Basic Structure of .asd file
[FILE GROUP LEVEL METADATA (only one in a single .asd file)]
[FILE LEVEL METADATA] [DATASET/TABLE LEVEL METADATA] [DATA TABLE SEPARATED BY (US) AND (RS)] [GROUP SEPARATOR CHARACTER (GS)] [DATASET/TABLE LEVEL METADATA] [DATA TABLE SEPARATED BY (US) AND (RS)]
[FILE SEPARATOR CHARACTER (FS)]
[FILE LEVEL METADATA] [DATASET/TABLE LEVEL METADATA] [DATA TABLE SEPARATED BY (US) AND (RS)] [GROUP SEPARATOR CHARACTER (GS)] [DATASET/TABLE LEVEL METADATA [DATA TABLE SEPARATED BY (US) AND (RS)] [GROUP SEPARATOR CHARACTER (GS)] [DATASET/TABLE LEVEL METADATA] [DATA TABLE SEPARATED BY (US) AND (RS)]
[FILE SEPARATOR CHARACTER (FS)]
[FILE LEVEL METADATA] [DATASET/TABLE LEVEL METADATA] [DATA TABLE SEPARATED BY (US) AND (RS)] [GROUP SEPARATOR CHARACTER (GS)] [DATASET/TABLE LEVEL METADATA] [DATA TABLE SEPARATED BY (US) AND (RS)]
- Note: newline characters are used for readability and will not appear in default .asd format
Installation
pip install asdfile
Usage
import asdfile as asd
Functions
- read_asd()
- write_asd()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file asdfile-0.0.1.tar.gz.
File metadata
- Download URL: asdfile-0.0.1.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5a7e5cb7ea9a455f544e7195eb4c4d8a226a8e71f87e3c16feb03e9f727fc7d
|
|
| MD5 |
b825b38545e9a436da926f1e86cee413
|
|
| BLAKE2b-256 |
45617e1a0b4e6aa8b18ee32fd0f9fe98bcd4de0e85ea5d84fdebf265c92ed4ff
|
File details
Details for the file asdfile-0.0.1-py3-none-any.whl.
File metadata
- Download URL: asdfile-0.0.1-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e95b4cb4ced832e521c9d2d161a2a26066cce0ea238a5401034a66ea074d5e92
|
|
| MD5 |
033c325b9fb87ea5e4c264bf12003054
|
|
| BLAKE2b-256 |
43138db2dd06f66dfb048010a035678b536f475453a83a4c9a40c178fe777f29
|