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 `

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sword-0.0.3.tar.gz (5.4 kB view details)

Uploaded Source

File details

Details for the file sword-0.0.3.tar.gz.

File metadata

  • Download URL: sword-0.0.3.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for sword-0.0.3.tar.gz
Algorithm Hash digest
SHA256 af67a8c4f37f7f0a1d8b7fad808b4ee9d18789c3dcd2166088ab2211d3755a3a
MD5 24a63c6e0abf94c4485a979b58167a5b
BLAKE2b-256 7070708abd5d190d26a9fbe626449d57086d7dca326a0058f1f5073688581cab

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.3 This release

1 file

0.0.2

1 file

0.0.1

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page