A csv parser. Can be advised to clean columns by type too...
Project description
csvlineparser
Based on https://secondboyet.com/articles/csvparser.html by Julian M Bucknall, rewritten in Python by raoulsson.
BNF Grammar:
csvFile ::= (csvRecord)* 'EOF'
csvRecord ::= csvStringList ('\n' | 'EOF')
csvStringList ::= rawString [',' csvStringList]
rawString := optionalSpaces [rawField optionalSpaces)]
optionalSpaces ::= whitespace*
whitespace ::= ' ' | '\t'
rawField ::= simpleField | quotedField
simpleField ::= (any char except \n, EOF, \t, space, comma or double quote)+
quotedField ::= '"' escapedField '"'
escapedField ::= subField ['"' '"' escapedField]
subField ::= (any char except double quote or EOF)+
Intsallation
pip install csvlineparser
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
csvlineparser-0.0.4.tar.gz
(7.2 kB
view details)
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 csvlineparser-0.0.4.tar.gz.
File metadata
- Download URL: csvlineparser-0.0.4.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e97e176a23fb22e051f53f1a6b8bd6a3e2f314314073692f9118719b40da25f
|
|
| MD5 |
b2e99418c77d27139b89c3b0e625a6d2
|
|
| BLAKE2b-256 |
0737dfeec10c2f2c1acb363e0e35deb378c11cb1596734d83c394d1079c6c287
|
File details
Details for the file csvlineparser-0.0.4-py3-none-any.whl.
File metadata
- Download URL: csvlineparser-0.0.4-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb7443b119437cec9faa160317db496347385b51174c71baa93989f6f1dd26c0
|
|
| MD5 |
0cf5c0e19418b46187bd9b31498933c9
|
|
| BLAKE2b-256 |
54d44660f95ec9f224ad4c6d11c0038ba6a9539c84bc93987719ff947f604d79
|