Name | lontras JSON |
Version |
0.0.1
JSON |
| download |
home_page | None |
Summary | A lightweight, dictionary-based DataFrame implementation in pure Python. Designed for simplicity and ease of use. Perfect for small projects or when a full-fledged DataFrame library is overkill. |
upload_time | 2025-01-12 14:20:24 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | None |
keywords |
dataframe
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Lontras
<img src="https://raw.githubusercontent.com/luxedo/lontras/refs/heads/main/docs/_static/lontra.png" height=400 alt="Lontras Logo"/>
[![PyPI - Version](https://img.shields.io/pypi/v/lontras.svg)](https://pypi.org/project/lontras)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/lontras.svg)](https://pypi.org/project/lontras)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue)](https://opensource.org/license/mit)
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/luxedo/lontras/publish.yml)
![Codecov](https://img.shields.io/codecov/c/github/luxedo/lontras)
![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/luxedo/lontras)
---
> ### ⚠️ This library is under development and has not been released yet
> We love `pandas` and its siblings! They're the industry-standard tools for powerful data
> manipulation. However, for smaller projects or when minimizing dependencies is paramount,
> `lontras` offers a lightweight, pure-Python alternative built on simple dictionaries. Designed
> for ease of use and direct integration, lontras encourages you to copy and paste its core
> components into your code. It's the perfect stand mixer for baking smaller data tasks when
> bringing out the full industrial equipment of `pandas` is too much.
>
> ### TLDR;
>
> - Small-scale `DataFrame` operations? `lontras`!
> - Fast `DataFrame` loading, no dependencies? `lontras`!
> - Embed `DataFrames` in [MicroPython](https://micropython.org/)? `lontras`!
> - Use `DataFrames` in the browser ([PyScript](https://pyscript.net/))? `lontras`!
> - High [Pandas](https://pandas.pydata.org/) compatibility? `lontras`!
## Table of Contents
- [Installation](#installation)
- [Documentation](#documentation)
- [Core Functionalities](#core-functionalities)
- [License](#license)
## Installation
If you prefer to install lontras using pip for easy management and updates, you can do so with the
following command:
```console
pip install lontras
# or
uv pip install lontras
```
This will download and install lontras from the Python Package Index (PyPI).
For lightweight projects where you want to avoid external dependencies, you can simply copy the
source file [src/lontras/lontras.py](src/lontras/lontras.py) into your project directory. This
allows you to directly use the library functions from your code without any installation.
## Documentation
Check out the API Docs at: ...
## Core Functionalities:
Lontras prioritizes simplicity and minimal dependencies. It leverages Python's native dictionaries
(via [UserDict](https://docs.python.org/3/library/collections.html#collections.UserDict)) to offer
core `DataFrame` and `Series` functionalities without external libraries.
### Data Structures:
- `Series`: A one-dimensional array-like structure.
- `DataFrame`: A two-dimensional labeled data structure.
### Accessing Data:
- `loc` and `iloc`: Access data by label or by index.
- Label-based access: Access data using standard dictionary-like syntax (e.g., series['label']).
- Positional access (slicing): Use slices for location-based access (e.g., series[1:3]).
- Attribute-based access: For convenient access to all values for a given key, use attribute-based access using **getattr** that dynamically retrieves data based on provided keys or a list of keys.
### Modifying Data:
- Setting values: Modify existing values or add new entries using `loc` or `iloc` assignment (e.g., series.loc['label'] = value).
- Deleting values: Remove entries using del series['label'].
- Concatenation: Combine Series or DataFrames vertically or horizontally.
### Transforming Data:
- Mapping and applying functions: Apply functions element-wise using map or along axes/indices using apply.
- Sorting: Sort indexes and values using provided sorting functions.
- Basic operations: Use standard Python operators (+, -, \*, /, //, %, \*\*, comparisons) for element-wise operations.
### Data Aggregation and Combination:
- groupby: Group data based on a column and perform operations within each group (similar to pandas groupby).
- Join/Merge: Merge two DataFrames based on specific columns (similar to pandas join/merge operations).
- reduce: Apply a function cumulatively to the elements. Basic reduction functions like max, min, argmax, sum, etc.
- Leverages Python's built-in statistics module for basic statistical calculations.
### Limitations & Trade-offs: (Same as before)
- Specialized Data Handling: Lontras focuses on core functionalities and doesn't include specialized functions for datetime, strings, or categorical data. However, users can achieve similar behavior through apply and map functions.
- Statistical Functions: Limited set of statistical functions. Lontras relies primarily on Python's built-in statistics module.
- Data Import/Export: Supports limited import/export formats. External libraries might be necessary for complex file handling.
- Missing Data Handling: Doesn't include dedicated functions for handling missing data. Users can implement their own logic using conditional statements or filtering.
- Multilevel Indexing: Lacks built-in support for multilevel indexing. However, tuple indexes can be used to achieve similar hierarchical structures.
- Plotting: Currently doesn't include plotting functionalities. External plotting libraries are recommended for visualization.
## License
`lontras` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
Raw data
{
"_id": null,
"home_page": null,
"name": "lontras",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "dataframe",
"author": null,
"author_email": "Luiz Eduardo Amaral <luizamaral306@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/1e/bf/c7818bf1e0edd5146afd45fbb078e2d6663ede0b2ef067385b22b9b15885/lontras-0.0.1.tar.gz",
"platform": null,
"description": "# Lontras\n\n<img src=\"https://raw.githubusercontent.com/luxedo/lontras/refs/heads/main/docs/_static/lontra.png\" height=400 alt=\"Lontras Logo\"/>\n\n[![PyPI - Version](https://img.shields.io/pypi/v/lontras.svg)](https://pypi.org/project/lontras)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/lontras.svg)](https://pypi.org/project/lontras)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue)](https://opensource.org/license/mit)\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/luxedo/lontras/publish.yml)\n![Codecov](https://img.shields.io/codecov/c/github/luxedo/lontras)\n![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/luxedo/lontras)\n\n---\n\n> ### \u26a0\ufe0f This library is under development and has not been released yet\n\n> We love `pandas` and its siblings! They're the industry-standard tools for powerful data\n> manipulation. However, for smaller projects or when minimizing dependencies is paramount,\n> `lontras` offers a lightweight, pure-Python alternative built on simple dictionaries. Designed\n> for ease of use and direct integration, lontras encourages you to copy and paste its core\n> components into your code. It's the perfect stand mixer for baking smaller data tasks when\n> bringing out the full industrial equipment of `pandas` is too much.\n>\n> ### TLDR;\n>\n> - Small-scale `DataFrame` operations? `lontras`!\n> - Fast `DataFrame` loading, no dependencies? `lontras`!\n> - Embed `DataFrames` in [MicroPython](https://micropython.org/)? `lontras`!\n> - Use `DataFrames` in the browser ([PyScript](https://pyscript.net/))? `lontras`!\n> - High [Pandas](https://pandas.pydata.org/) compatibility? `lontras`!\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Documentation](#documentation)\n- [Core Functionalities](#core-functionalities)\n- [License](#license)\n\n## Installation\n\nIf you prefer to install lontras using pip for easy management and updates, you can do so with the\nfollowing command:\n\n```console\npip install lontras\n# or\nuv pip install lontras\n```\n\nThis will download and install lontras from the Python Package Index (PyPI).\n\nFor lightweight projects where you want to avoid external dependencies, you can simply copy the\nsource file [src/lontras/lontras.py](src/lontras/lontras.py) into your project directory. This\nallows you to directly use the library functions from your code without any installation.\n\n## Documentation\n\nCheck out the API Docs at: ...\n\n## Core Functionalities:\n\nLontras prioritizes simplicity and minimal dependencies. It leverages Python's native dictionaries\n(via [UserDict](https://docs.python.org/3/library/collections.html#collections.UserDict)) to offer\ncore `DataFrame` and `Series` functionalities without external libraries.\n\n### Data Structures:\n\n- `Series`: A one-dimensional array-like structure.\n- `DataFrame`: A two-dimensional labeled data structure.\n\n### Accessing Data:\n\n- `loc` and `iloc`: Access data by label or by index.\n- Label-based access: Access data using standard dictionary-like syntax (e.g., series['label']).\n- Positional access (slicing): Use slices for location-based access (e.g., series[1:3]).\n- Attribute-based access: For convenient access to all values for a given key, use attribute-based access using **getattr** that dynamically retrieves data based on provided keys or a list of keys.\n\n### Modifying Data:\n\n- Setting values: Modify existing values or add new entries using `loc` or `iloc` assignment (e.g., series.loc['label'] = value).\n- Deleting values: Remove entries using del series['label'].\n- Concatenation: Combine Series or DataFrames vertically or horizontally.\n\n### Transforming Data:\n\n- Mapping and applying functions: Apply functions element-wise using map or along axes/indices using apply.\n- Sorting: Sort indexes and values using provided sorting functions.\n- Basic operations: Use standard Python operators (+, -, \\*, /, //, %, \\*\\*, comparisons) for element-wise operations.\n\n### Data Aggregation and Combination:\n\n- groupby: Group data based on a column and perform operations within each group (similar to pandas groupby).\n- Join/Merge: Merge two DataFrames based on specific columns (similar to pandas join/merge operations).\n- reduce: Apply a function cumulatively to the elements. Basic reduction functions like max, min, argmax, sum, etc.\n- Leverages Python's built-in statistics module for basic statistical calculations.\n\n### Limitations & Trade-offs: (Same as before)\n\n- Specialized Data Handling: Lontras focuses on core functionalities and doesn't include specialized functions for datetime, strings, or categorical data. However, users can achieve similar behavior through apply and map functions.\n- Statistical Functions: Limited set of statistical functions. Lontras relies primarily on Python's built-in statistics module.\n- Data Import/Export: Supports limited import/export formats. External libraries might be necessary for complex file handling.\n- Missing Data Handling: Doesn't include dedicated functions for handling missing data. Users can implement their own logic using conditional statements or filtering.\n- Multilevel Indexing: Lacks built-in support for multilevel indexing. However, tuple indexes can be used to achieve similar hierarchical structures.\n- Plotting: Currently doesn't include plotting functionalities. External plotting libraries are recommended for visualization.\n\n## License\n\n`lontras` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.\n",
"bugtrack_url": null,
"license": null,
"summary": "A lightweight, dictionary-based DataFrame implementation in pure Python. Designed for simplicity and ease of use. Perfect for small projects or when a full-fledged DataFrame library is overkill.",
"version": "0.0.1",
"project_urls": {
"Documentation": "https://github.com/Luiz Eduardo Amaral/lontras#readme",
"Issues": "https://github.com/Luiz Eduardo Amaral/lontras/issues",
"Source": "https://github.com/Luiz Eduardo Amaral/lontras"
},
"split_keywords": [
"dataframe"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "42fff217a2d87f65e795a76d4554ede3a23661e09937da6964379ac747e4bdcf",
"md5": "371722981d4469d0d2e7c3de534d9258",
"sha256": "c5297445c6015c2c442c141aabf2adc4f88cf9ff5b8a6b6ca45f7966609b3616"
},
"downloads": -1,
"filename": "lontras-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "371722981d4469d0d2e7c3de534d9258",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 10527,
"upload_time": "2025-01-12T14:20:21",
"upload_time_iso_8601": "2025-01-12T14:20:21.761692Z",
"url": "https://files.pythonhosted.org/packages/42/ff/f217a2d87f65e795a76d4554ede3a23661e09937da6964379ac747e4bdcf/lontras-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1ebfc7818bf1e0edd5146afd45fbb078e2d6663ede0b2ef067385b22b9b15885",
"md5": "8f03b6851dbfbda1fc9048135b30bc1e",
"sha256": "bf55434e8f7b4140cdfde3de1ad208545c49ff07d084e47590975a5b4c8345bd"
},
"downloads": -1,
"filename": "lontras-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "8f03b6851dbfbda1fc9048135b30bc1e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 369070,
"upload_time": "2025-01-12T14:20:24",
"upload_time_iso_8601": "2025-01-12T14:20:24.409164Z",
"url": "https://files.pythonhosted.org/packages/1e/bf/c7818bf1e0edd5146afd45fbb078e2d6663ede0b2ef067385b22b9b15885/lontras-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-12 14:20:24",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Luiz Eduardo Amaral",
"github_project": "lontras#readme",
"github_not_found": true,
"lcname": "lontras"
}