Skip to main content

My utilities for basic data science

Reason this release was yanked:

Was not rebased on tip of main branch

Project description

datasci

Tents: tabular entries

Build a TSV

from datasci import Tents

header = ["col1", "col2", "col3"]
tents = Tents(header=header)
for val1, val2, val3 in zip([1,2], [3,4], [5,6]):
    new_tent = tents.new()
    new_tent.update(col1=val1)
    new_tent.col2 = val2
    new_tent["col3"] = val3
    tents.add(new_tent)
with open("outfile.tsv", "w") as ofstream:
    print(tents, file=ofstream)
$cat outfile.tsv
col1	col2	col3
1	3	5
2	4	6

Load a TSV

from datasci import Tents

tents = Tents.from_tsv("outfile.tsv") # If the TSV does not have a header, you can also specify it with the 'header' argument
tents.sort(key_name="col1", descending=True)
print(tents)
col1	col2	col3
2	4	6
1	3	5

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

datasci_bricoletc-0.3.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datasci_bricoletc-0.3.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file datasci_bricoletc-0.3.0.tar.gz.

File metadata

  • Download URL: datasci_bricoletc-0.3.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.14

File hashes

Hashes for datasci_bricoletc-0.3.0.tar.gz
Algorithm Hash digest
SHA256 8e1c992b959a9c2410f417011fdfb52033c656b3a8963a6a685639a361ad5a24
MD5 d39a3244700f8ec8cd92e4de16121277
BLAKE2b-256 258a93e97cbbce1218cbc3dba3286ec6a74099caecff66c90b9249bcd0824580

See more details on using hashes here.

File details

Details for the file datasci_bricoletc-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for datasci_bricoletc-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d1a135fbe7beb0e10cdddeb32b17106d9f9cfb911f302dc586dc736d05e875ce
MD5 babce21ecaf66f4c8b99a7fc789b62fc
BLAKE2b-256 1787b6599d3fa0b2304bd250f5136699e3bc83dcaa4084999150b521f24b44c2

See more details on using hashes here.

Supported by

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