Skip to main content

# Sword

A Fast Data Mining C Library for Python

## Intro

sword is a Python C Extension for making data mining and data searching super fast. It’s designed to give you amazing performance in the comfort and simplicity of Python. sword offers a wide array of tools to parse and search tabular data, csv, xml, and much more.

### Status

sword is still in the active development phase. It currently supports some CSV functionality. More detailed and rich features will be released in coming patch releases.

## Functions

sword currently provides the following functions:

#### csv_read_row:

This function reads a single CSV row from a string, and returns a tuple containing:

  • The list containing the row elements.

  • The remaining unread string.

Example:

`py >>> import sword >>> sword.csv_read_row("54.7,32.6,54.7\n") ([b'54.7', b'32.6', b'54.7'], b'\n') `

#### csv_count_rows:

Counts the number of rows in a CSV-string

Exmaple:

`py >>> import sword >>> sword.csv_count_rows("1,2\n3,4\n5,5,5,5\n") 3 `

#### csv_count_cols:

Counts the number of columns in a CSv-string

Example:

`py >>> import sword >>> sword.csv_count_cols("1,2,3,4\n") 4 `

Release files for sword 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sword 0.0.3
File Size Uploaded
sword-0.0.3.tar.gz 5.4 kB Details

Release files / sword-0.0.3.tar.gz

Download URL sword-0.0.3.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
af67a8c4f37f7f0a1d8b7fad808b4ee9d18789c3dcd2166088ab2211d3755a3a
BLAKE2b-256 checksum
How to use checksums
7070708abd5d190d26a9fbe626449d57086d7dca326a0058f1f5073688581cab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

Release history Release notifications | RSS feed

This release

0.0.3 This release

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page