mds-csv-reader


Namemds-csv-reader JSON
Version 1.0.5 PyPI version JSON
download
home_pagehttps://www.m-ds.de/
SummaryConvert csv-file to list of dictinaries
upload_time2023-07-28 07:23:38
maintainer
docs_urlNone
authormartin-data services
requires_python
licenseGPL-3
keywords csv convert
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            mds-csv-reader
==============
Read a csv-file, converts to list of dictionaries.

Install
=======
pip install mds-csv-reader

Howto
=====

Syntax
------

::

  import_csv_file(
         csvfile,                          # file or string
         firstline=True,                   # first line contains column names
         decimalremove=['€', 'EUR', '.'],  # remove these strings from decimal columns
         ignline=[1, 2, ...],              # skip these lines
         ignore_leer=['<column nam>',...], # ignore empty values in these columns
         encod='utf-8',                    # encoding if 'csvfile' is byte type
         )

Column names
------------

- column names must contain field type info
- allowed types: C, D, DT, T, N, L

Example
-------

NAME1,C
 type String
CREATEDATE,D,%Y-%m-%d
 type Date, detection tries defined format
CREATEDATE,D
 type Date, detection tries predefines formats
DATETIME,DT,%Y-%m-%d %H:%M
 type DateTime, detection tries defined format
DATETIME,DT
 type DateTime, detection tries predefines formats
CREATETIME,T,%H:%M
 type Time, detection tries defined format
CREATETIME,T
 type Time, detection tries predefines formats
NUMSTEP,N,10,0
 type Numeric (no decimals) --> Integer
AMOUNT,N,16,2
 type Numeric (two decimals) --> Decimal
ISENABLED,L
 Boolean (allowed: true, false, t, f, wahr, falsch, 1, 0)
default-type: String
 if convert to requested type fails


Changes
=======

*1.0.5 - 28.07.2023*

- code optimized

*1.0.4 - 09.01.2020*

- fix: detection of boolean, import of csv-text-data

*1.0.2 - 20.12.2019*

- exteded detection of date and time formats

*1.0.0 - 17.12.2019*

- optimized detection of formatting in csv-file

*1.0.0 - 17.12.2019*

- first public version



            

Raw data

            {
    "_id": null,
    "home_page": "https://www.m-ds.de/",
    "name": "mds-csv-reader",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "csv convert",
    "author": "martin-data services",
    "author_email": "service@m-ds.de",
    "download_url": "https://files.pythonhosted.org/packages/45/61/be55b55321ddfd97e542d4d887c72aace938d0813d385f3d4d1c02a05b72/mds_csv_reader-1.0.5.tar.gz",
    "platform": null,
    "description": "mds-csv-reader\n==============\nRead a csv-file, converts to list of dictionaries.\n\nInstall\n=======\npip install mds-csv-reader\n\nHowto\n=====\n\nSyntax\n------\n\n::\n\n  import_csv_file(\n         csvfile,                          # file or string\n         firstline=True,                   # first line contains column names\n         decimalremove=['\u20ac', 'EUR', '.'],  # remove these strings from decimal columns\n         ignline=[1, 2, ...],              # skip these lines\n         ignore_leer=['<column nam>',...], # ignore empty values in these columns\n         encod='utf-8',                    # encoding if 'csvfile' is byte type\n         )\n\nColumn names\n------------\n\n- column names must contain field type info\n- allowed types: C, D, DT, T, N, L\n\nExample\n-------\n\nNAME1,C\n type String\nCREATEDATE,D,%Y-%m-%d\n type Date, detection tries defined format\nCREATEDATE,D\n type Date, detection tries predefines formats\nDATETIME,DT,%Y-%m-%d %H:%M\n type DateTime, detection tries defined format\nDATETIME,DT\n type DateTime, detection tries predefines formats\nCREATETIME,T,%H:%M\n type Time, detection tries defined format\nCREATETIME,T\n type Time, detection tries predefines formats\nNUMSTEP,N,10,0\n type Numeric (no decimals) --> Integer\nAMOUNT,N,16,2\n type Numeric (two decimals) --> Decimal\nISENABLED,L\n Boolean (allowed: true, false, t, f, wahr, falsch, 1, 0)\ndefault-type: String\n if convert to requested type fails\n\n\nChanges\n=======\n\n*1.0.5 - 28.07.2023*\n\n- code optimized\n\n*1.0.4 - 09.01.2020*\n\n- fix: detection of boolean, import of csv-text-data\n\n*1.0.2 - 20.12.2019*\n\n- exteded detection of date and time formats\n\n*1.0.0 - 17.12.2019*\n\n- optimized detection of formatting in csv-file\n\n*1.0.0 - 17.12.2019*\n\n- first public version\n\n\n",
    "bugtrack_url": null,
    "license": "GPL-3",
    "summary": "Convert csv-file to list of dictinaries",
    "version": "1.0.5",
    "project_urls": {
        "Homepage": "https://www.m-ds.de/"
    },
    "split_keywords": [
        "csv",
        "convert"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "25f83c327ce2f6f97801e32c3d30eb099c44537fc8a9f2e5cd44b620d314ec6d",
                "md5": "0f050ca0aa6efc50d8721097ca130aa5",
                "sha256": "d225304a8c7e63c065194294a26a681b0eb6fedd6fc5ced55cec362e59b6ce8b"
            },
            "downloads": -1,
            "filename": "mds_csv_reader-1.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0f050ca0aa6efc50d8721097ca130aa5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5170,
            "upload_time": "2023-07-28T07:23:36",
            "upload_time_iso_8601": "2023-07-28T07:23:36.867825Z",
            "url": "https://files.pythonhosted.org/packages/25/f8/3c327ce2f6f97801e32c3d30eb099c44537fc8a9f2e5cd44b620d314ec6d/mds_csv_reader-1.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4561be55b55321ddfd97e542d4d887c72aace938d0813d385f3d4d1c02a05b72",
                "md5": "ff5bd024a818940e3a575af84ae97b05",
                "sha256": "f622e7a8335ece3e93e4fb9d0019bb41c274f2fe90d96b143b4bd763e9a265b3"
            },
            "downloads": -1,
            "filename": "mds_csv_reader-1.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "ff5bd024a818940e3a575af84ae97b05",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5180,
            "upload_time": "2023-07-28T07:23:38",
            "upload_time_iso_8601": "2023-07-28T07:23:38.392007Z",
            "url": "https://files.pythonhosted.org/packages/45/61/be55b55321ddfd97e542d4d887c72aace938d0813d385f3d4d1c02a05b72/mds_csv_reader-1.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-28 07:23:38",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "mds-csv-reader"
}
        
Elapsed time: 0.32654s