Skip to main content

A small Python library to deal with big tables

Project description

Lemuras

Sometimes you cannot or don't want to use Pandas or similar advanced tool for data analysis, but still have a need to manipulate large tables with code. In such cases you can use Lemuras – it is a pure Python library without external dependencies. And if you have some experience of Pandas or SQL, then you can easily work with Lemuras.

Again, this library may be considered as a simplified analogue of Pandas, but not as a replacement. However, Lemuras is capable of processing an operation on a few tables with several thousands of rows in less than a second on a simple web server. So, if you need a tiny library to generate analytical reports or convert table formats, Lemuras is a good choice!

Features

  • Integration with Jupyter IPython Notebook: Lemuras objects are printed as nice tables.
  • Save / load CSV files, JSON, HTML tables, SQL (both query result and table creation code).
  • Automatic columns types detection, simple type conversion.
  • Access, add, edit, delete cells, rows, columns. Apply custom of built-in functions, lambdas, sort the data, iterate over rows.
  • Advanced processing of columns: you can take any table column, apply any function or lambda, do math with several columns and discrete values, compare them, check existing in other columns or lists, filter a table by it, or add it to a table, etc... In other words, you can do anything!
  • Grouping by none, one, or multiple columns, aggregation with built-in or user-defined functions and lambdas for specified or just all the columns.
  • Merge (Join): inner / left / right / outer.
  • Tables concatenation and appending.
  • Pivot tables creation.

It is tasted on Python 2.7 and Python 3.4-3.7

Examples

All the features are described in notebook examples:

  1. Basic things – access to columns, cells, rows; add, delete, change their values; also filtering and sorting. 1.5) Functions applying – apply functions or lambda expressions to columns or tables, change types, aggregate values, use your own or one of lots predefined useful functions (oncluding statistical ones).
  2. Group by – grouping and combining (aggregating).
  3. Merge / Join – such types: inner, outer, left, right.
  4. Pivot table – create new tables with columns, rows and cells from another table.
  5. Tables Concatenate / Append – simple tables concatenation and appending.
  6. Types, Read/Write, CSV, SQL, JSON, HTML – description of Lemuras supported data types, saving to and loading from CSV, SQL, JSON, HTML formats.

In addition, there are several complex examples of solving a real world problems:

  1. Retargeting results report

  2. Filtration by location area

  3. OLAP reports parser with CSV, TSV, and even XLS support

The code of Lemuras is well-commented, also there are many unit-tests, so, you can easily find useful information there. Contributions are welcome.

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

Lemuras-1.2.3.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

Lemuras-1.2.3-py3-none-any.whl (31.0 kB view details)

Uploaded Python 3

File details

Details for the file Lemuras-1.2.3.tar.gz.

File metadata

  • Download URL: Lemuras-1.2.3.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.3

File hashes

Hashes for Lemuras-1.2.3.tar.gz
Algorithm Hash digest
SHA256 9b27ef295e4115d32cc7703ee9efe879cca083465a93acf8aca976f80a355050
MD5 ee45cbf20942c5ea60228d43557bacf1
BLAKE2b-256 e11a45faa3a14aafcd0097b10753e24818305a74647bdefeee03d3a42530d087

See more details on using hashes here.

File details

Details for the file Lemuras-1.2.3-py3-none-any.whl.

File metadata

  • Download URL: Lemuras-1.2.3-py3-none-any.whl
  • Upload date:
  • Size: 31.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.3

File hashes

Hashes for Lemuras-1.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0b6f910409a30ab1c7a7097748317ece6ed8f3fa0e2de30b517ff270c7c06b31
MD5 7cea5d8d993526990f763cb4180aaffc
BLAKE2b-256 0e439024dd9252ea11bf9b6ce22dae17e5c48c19943136d901f62a58b36a6227

See more details on using hashes here.

Supported by

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