``un-xtab.py`` is a Python module and command-line program that rearranges data from a crosstabulated format to a normalized format. It takes data in this form:
+---------+------------+------------+------------+
| Station | 2006-05-23 | 2006-06-15 | 2006-07-19 |
+=========+============+============+============+
| WQ-01 | 4.5 | 3.7 | 6.8 |
+---------+------------+------------+------------+
| WQ-02 | 9.7 | 5.1 | 7.2 |
+---------+------------+------------+------------+
| WQ-03 | 10 | 6.1 | 8.8 |
+---------+------------+------------+------------+
and rearranges it into this form:
+---------+------------+-------+
| Station | Date | Value |
+=========+============+=======+
| WQ-01 | 2006-05-23 | 4.5 |
+---------+------------+-------+
| WQ-02 | 2006-05-23 | 3.7 |
+---------+------------+-------+
| WQ-03 | 2006-05-23 | 6.8 |
+---------+------------+-------+
| WQ-01 | 2006-06-15 | 9.7 |
+---------+------------+-------+
| WQ-02 | 2006-05-15 | 5.1 |
+---------+------------+-------+
| WQ-03 | 2006-06-15 | 7.2 |
+---------+------------+-------+
| WQ-01 | 2006-07-19 | 10 |
+---------+------------+-------+
| WQ-02 | 2006-07-19 | 6.1 |
+---------+------------+-------+
| WQ-03 | 2006-07-19 | 8.8 |
+---------+------------+-------+
Input and output are both text (CSV) files.
You can use the un-xtab program to rearrange data that have been provided in a format designed for readability into a format that is more suitable for storage in a database, or for use with statistical, modeling, graphics, or other software.
The un-xtab program can deal with crosstabbed formats that include multiple rows of column headers and groups of data values that were crosstabbed together.
A row number can be added to assist with post-processing of the output file, if necessary.
Complete documentation is at ReadTheDocs: https://un-xtab.readthedocs.io/.
Raw data
{
"_id": null,
"home_page": "https://osdn.net/projects/un-xtab/",
"name": "un-xtab",
"maintainer": "",
"docs_url": "https://pythonhosted.org/un-xtab/",
"requires_python": "",
"maintainer_email": "",
"keywords": "CSV,crosstab",
"author": "Dreas Nielsen",
"author_email": "dreas.nielsen@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/e8/c9/ffd810f2fc96f018814c508ec42d2b27f2fbd5d9ef4d18b5e4b461a8a19a/un-xtab-1.2.0.tar.gz",
"platform": null,
"description": "``un-xtab.py`` is a Python module and command-line program that rearranges data from a crosstabulated format to a normalized format. It takes data in this form:\n\n+---------+------------+------------+------------+\n| Station | 2006-05-23 | 2006-06-15 | 2006-07-19 |\n+=========+============+============+============+\n| WQ-01 | 4.5 | 3.7 | 6.8 |\n+---------+------------+------------+------------+\n| WQ-02 | 9.7 | 5.1 | 7.2 |\n+---------+------------+------------+------------+\n| WQ-03 | 10 | 6.1 | 8.8 |\n+---------+------------+------------+------------+\n\nand rearranges it into this form:\n\n+---------+------------+-------+\n| Station | Date | Value |\n+=========+============+=======+\n| WQ-01 | 2006-05-23 | 4.5 |\n+---------+------------+-------+\n| WQ-02 | 2006-05-23 | 3.7 |\n+---------+------------+-------+\n| WQ-03 | 2006-05-23 | 6.8 |\n+---------+------------+-------+\n| WQ-01 | 2006-06-15 | 9.7 |\n+---------+------------+-------+\n| WQ-02 | 2006-05-15 | 5.1 |\n+---------+------------+-------+\n| WQ-03 | 2006-06-15 | 7.2 |\n+---------+------------+-------+\n| WQ-01 | 2006-07-19 | 10 |\n+---------+------------+-------+\n| WQ-02 | 2006-07-19 | 6.1 |\n+---------+------------+-------+\n| WQ-03 | 2006-07-19 | 8.8 |\n+---------+------------+-------+\n\nInput and output are both text (CSV) files.\n\nYou can use the un-xtab program to rearrange data that have been provided in a format designed for readability into a format that is more suitable for storage in a database, or for use with statistical, modeling, graphics, or other software.\n\nThe un-xtab program can deal with crosstabbed formats that include multiple rows of column headers and groups of data values that were crosstabbed together. \n\nA row number can be added to assist with post-processing of the output file, if necessary.\n\nComplete documentation is at ReadTheDocs: https://un-xtab.readthedocs.io/.",
"bugtrack_url": null,
"license": "GPL",
"summary": "Un-crosstab data in a text file.",
"version": "1.2.0",
"split_keywords": [
"csv",
"crosstab"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e8c9ffd810f2fc96f018814c508ec42d2b27f2fbd5d9ef4d18b5e4b461a8a19a",
"md5": "2ffa2f319081279916ccbacd26b43aaa",
"sha256": "974508b4d0b88fb92283c9f40d09566e028ab687bb62737ec81efc484a6052e4"
},
"downloads": -1,
"filename": "un-xtab-1.2.0.tar.gz",
"has_sig": false,
"md5_digest": "2ffa2f319081279916ccbacd26b43aaa",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 12623,
"upload_time": "2023-01-29T21:45:15",
"upload_time_iso_8601": "2023-01-29T21:45:15.511655Z",
"url": "https://files.pythonhosted.org/packages/e8/c9/ffd810f2fc96f018814c508ec42d2b27f2fbd5d9ef4d18b5e4b461a8a19a/un-xtab-1.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-29 21:45:15",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "un-xtab"
}