a-pandas-ex-read-charsep-frames


Namea-pandas-ex-read-charsep-frames JSON
Version 0.10 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/a_pandas_ex_read_charsep_frames
SummaryReads data separated by any char
upload_time2023-03-01 01:19:21
maintainer
docs_urlNone
authorJohannes Fischer
requires_python
licenseMIT
keywords pandas csv read
VCS
bugtrack_url
requirements a_pandas_ex_horizontal_explode normalize_lists pandas
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Reads data separated by any char  



## pip install a-pandas-ex-read-charsep-frames



### Common problem:





```python

  File "pandas\_libs\parsers.pyx", line 808, in pandas._libs.parsers.TextReader.read_low_memory

  File "pandas\_libs\parsers.pyx", line 866, in pandas._libs.parsers.TextReader._read_rows

  File "pandas\_libs\parsers.pyx", line 852, in pandas._libs.parsers.TextReader._tokenize_rows

  File "pandas\_libs\parsers.pyx", line 1973, in pandas._libs.parsers.raise_parser_error

pandas.errors.ParserError: Error tokenizing data. C error: Expected 4 fields in line 4, saw 5

```



### Fills up missing values with NaN

```python

from a_pandas_ex_read_charsep_frames import pd_add_read_charsep_frames

import pandas as pd

pd_add_read_charsep_frames()

df = pd.Q_read_charsep_frames(

    encoding="utf-8",

    file_or_string=r"C:\Users\Gamer\Documents\Downloads\alladd.txt",

    sep="\t",

)



print(df)





             0_0  ...                                                0_4

0       01001000  ...                                               <NA>

1       01001001  ...                                               <NA>

2       01001010  ...                                               <NA>

3       01001900  ...   UNESP - Universidade Estadual Júlio de Mesqui...

4       01001901  ...                               Edifício Santa Lídia

          ...  ...                                                ...

732758  99975970  ...                                 AGC São João Bosco

732759  99978000  ...                                               <NA>

732760  99980000  ...                                               <NA>

732761  99980970  ...                                 AC David Canabarro

732762  99980974  ...                           AGC São José do Capingui

[732763 rows x 5 columns]





```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/a_pandas_ex_read_charsep_frames",
    "name": "a-pandas-ex-read-charsep-frames",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "pandas,csv,read",
    "author": "Johannes Fischer",
    "author_email": "<aulasparticularesdealemaosp@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/ee/1b/03b4a3e284d9bc23a7fa137038b8d665dde8ffc2efe75f74766c70be988b/a_pandas_ex_read_charsep_frames-0.10.tar.gz",
    "platform": null,
    "description": "\n# Reads data separated by any char  \n\n\n\n## pip install a-pandas-ex-read-charsep-frames\n\n\n\n### Common problem:\n\n\n\n\n\n```python\n\n  File \"pandas\\_libs\\parsers.pyx\", line 808, in pandas._libs.parsers.TextReader.read_low_memory\n\n  File \"pandas\\_libs\\parsers.pyx\", line 866, in pandas._libs.parsers.TextReader._read_rows\n\n  File \"pandas\\_libs\\parsers.pyx\", line 852, in pandas._libs.parsers.TextReader._tokenize_rows\n\n  File \"pandas\\_libs\\parsers.pyx\", line 1973, in pandas._libs.parsers.raise_parser_error\n\npandas.errors.ParserError: Error tokenizing data. C error: Expected 4 fields in line 4, saw 5\n\n```\n\n\n\n### Fills up missing values with NaN\n\n```python\n\nfrom a_pandas_ex_read_charsep_frames import pd_add_read_charsep_frames\n\nimport pandas as pd\n\npd_add_read_charsep_frames()\n\ndf = pd.Q_read_charsep_frames(\n\n    encoding=\"utf-8\",\n\n    file_or_string=r\"C:\\Users\\Gamer\\Documents\\Downloads\\alladd.txt\",\n\n    sep=\"\\t\",\n\n)\n\n\n\nprint(df)\n\n\n\n\n\n             0_0  ...                                                0_4\n\n0       01001000  ...                                               <NA>\n\n1       01001001  ...                                               <NA>\n\n2       01001010  ...                                               <NA>\n\n3       01001900  ...   UNESP - Universidade Estadual J\u00falio de Mesqui...\n\n4       01001901  ...                               Edif\u00edcio Santa L\u00eddia\n\n          ...  ...                                                ...\n\n732758  99975970  ...                                 AGC S\u00e3o Jo\u00e3o Bosco\n\n732759  99978000  ...                                               <NA>\n\n732760  99980000  ...                                               <NA>\n\n732761  99980970  ...                                 AC David Canabarro\n\n732762  99980974  ...                           AGC S\u00e3o Jos\u00e9 do Capingui\n\n[732763 rows x 5 columns]\n\n\n\n\n\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Reads data separated by any char",
    "version": "0.10",
    "split_keywords": [
        "pandas",
        "csv",
        "read"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c38a6d65f6008f3fcfa70fb4c0ccca7af3c4b001b8b0dfd59ec51ca232062313",
                "md5": "7620f6927fb905b00d24b9f5e3f418f5",
                "sha256": "360acd03726238359dd602c903745d2f73ebc3fb74e708c514f5f1fcfb286706"
            },
            "downloads": -1,
            "filename": "a_pandas_ex_read_charsep_frames-0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7620f6927fb905b00d24b9f5e3f418f5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5820,
            "upload_time": "2023-03-01T01:19:20",
            "upload_time_iso_8601": "2023-03-01T01:19:20.248315Z",
            "url": "https://files.pythonhosted.org/packages/c3/8a/6d65f6008f3fcfa70fb4c0ccca7af3c4b001b8b0dfd59ec51ca232062313/a_pandas_ex_read_charsep_frames-0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ee1b03b4a3e284d9bc23a7fa137038b8d665dde8ffc2efe75f74766c70be988b",
                "md5": "15c5d5f5f8b433353c285f8f7e6e79d7",
                "sha256": "007d2daa5e52aa6d0b205afcd9f47f2de4a0a531f8b8cf7e87aae76d55edac4d"
            },
            "downloads": -1,
            "filename": "a_pandas_ex_read_charsep_frames-0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "15c5d5f5f8b433353c285f8f7e6e79d7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3819,
            "upload_time": "2023-03-01T01:19:21",
            "upload_time_iso_8601": "2023-03-01T01:19:21.667399Z",
            "url": "https://files.pythonhosted.org/packages/ee/1b/03b4a3e284d9bc23a7fa137038b8d665dde8ffc2efe75f74766c70be988b/a_pandas_ex_read_charsep_frames-0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-01 01:19:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "hansalemaos",
    "github_project": "a_pandas_ex_read_charsep_frames",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "a_pandas_ex_horizontal_explode",
            "specs": []
        },
        {
            "name": "normalize_lists",
            "specs": []
        },
        {
            "name": "pandas",
            "specs": []
        }
    ],
    "lcname": "a-pandas-ex-read-charsep-frames"
}
        
Elapsed time: 0.11653s