Reads data separated by any char
Project description
Reads data separated by any char
pip install a-pandas-ex-read-charsep-frames
Common problem:
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
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]
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file a_pandas_ex_read_charsep_frames-0.10.tar.gz
.
File metadata
- Download URL: a_pandas_ex_read_charsep_frames-0.10.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 007d2daa5e52aa6d0b205afcd9f47f2de4a0a531f8b8cf7e87aae76d55edac4d |
|
MD5 | 15c5d5f5f8b433353c285f8f7e6e79d7 |
|
BLAKE2b-256 | ee1b03b4a3e284d9bc23a7fa137038b8d665dde8ffc2efe75f74766c70be988b |
File details
Details for the file a_pandas_ex_read_charsep_frames-0.10-py3-none-any.whl
.
File metadata
- Download URL: a_pandas_ex_read_charsep_frames-0.10-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 360acd03726238359dd602c903745d2f73ebc3fb74e708c514f5f1fcfb286706 |
|
MD5 | 7620f6927fb905b00d24b9f5e3f418f5 |
|
BLAKE2b-256 | c38a6d65f6008f3fcfa70fb4c0ccca7af3c4b001b8b0dfd59ec51ca232062313 |