Metadata-Version: 2.1
Name: riptable
Version: 1.17.1
Summary: Python Package for riptable studies framework
Author-email: RTOS Holdings <rtosholdings-bot@sig.com>
License: BSD 3-Clause+Patent License
        
        Copyright (c) 2020, RTOS Holdings
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
        
        Subject to the terms and conditions of this license, each copyright holder and contributor hereby grants to those receiving rights under this license a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except for failure to satisfy the conditions of this license) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer this software, where such license applies only to those patent claims, already acquired or hereafter acquired, licensable by such copyright holder or contributor that are necessarily infringed by:
        
        (a) their Contribution(s) (the licensed copyrights of copyright holders and non-copyrightable additions of contributors, in source or binary form) alone; or
        
        (b) combination of their Contribution(s) with the work of authorship to which such Contribution(s) was added by such copyright holder or contributor, if, at the time the Contribution is added, such addition causes such combination to be necessarily infringed. The patent license shall not apply to any other combinations which include the Contribution.
        
        Except as expressly stated above, no rights or licenses from any copyright holder or contributor is granted under this license, whether expressly, by implication, estoppel or otherwise.
        
        DISCLAIMER
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Project-URL: Repository, https://github.com/rtosholdings/riptable
Project-URL: Documentation, https://riptable.readthedocs.io/en/stable/
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: LICENSES-thirdparty.md
Requires-Dist: ansi2html>=1.5.2
Requires-Dist: numba>=0.56.2
Requires-Dist: numpy>=1.23
Requires-Dist: pandas<3.0,>=1.0
Requires-Dist: python-dateutil
Requires-Dist: riptide_cpp<2,>=1.19.0
Requires-Dist: typing-extensions>=4.9.0

# Riptable

![](https://riptable.readthedocs.io/en/stable/_static/riptable_logo.PNG)

An open-source, 64-bit Python analytics engine for high-performance data analysis with
multithreading support. Riptable supports Python 3.10 through 3.12 on 64-bit Linux and
Windows.

Similar to Pandas and based on NumPy, Riptable optimizes analyzing large volumes of data
interactively, in real time. Riptable can crunch numbers often at 1.5x to 10x the speed
of NumPy or Pandas.

Riptable achieves maximum speed through the use of:

* **[Vector instrinsics](https://software.intel.com/sites/landingpage/IntrinsicsGuide/)**
with hand-rolled loops using [AVX-256](https://en.wikipedia.org/wiki/Advanced_Vector_Extensions#CPUs_with_AVX2)
and with [AVX-512](https://en.wikipedia.org/wiki/AVX-512) support coming.
* **[Parallel computing](https://www.drdobbs.com/go-parallel/article/print?articleId=212903586)**
with multiple-thread deployment for large arrays.
* **[Recycling](https://en.wikipedia.org/wiki/Garbage_collection_(computer_science))**
with built-in array garbage collection.
* **[Hashing](https://en.wikipedia.org/wiki/Hash_function)** and **parallel sorts** for
core algorithms.

Intro to Riptable and reference documentation is available at:
[riptable.readthedocs.io](https://riptable.readthedocs.io/en/stable/index.html)

Basic concepts and classes
--------------------------

**[FastArray](https://riptable.readthedocs.io/en/stable/autoapi/riptable/rt_fastarray/index.html)**
is a subclass of NumPy's `ndarray` that enables built-in multithreaded number crunching.
All Scikit routines that expect a NumPy array also accept a `FastArray`.

**[Dataset](https://riptable.readthedocs.io/en/stable/autoapi/riptable/rt_dataset/index.html)**
replaces the Pandas `DataFrame` class and holds NumPy arrays of equal length.

**[Struct](https://riptable.readthedocs.io/en/stable/autoapi/riptable/rt_struct/index.html)**
holds a collection of mixed-type data members, with `Dataset` as a subclass.

**[Categorical](https://riptable.readthedocs.io/en/stable/autoapi/riptable/rt_categorical/index.html)**
replaces both the Pandas `DataFrame.groupby()` method and the Pandas `Categorical`
class. A Riptable `Categorical` supports multi-key, filterable groupings with the same
functionality of Pandas `groupby` and more.

**[Datetime](https://riptable.readthedocs.io/en/stable/autoapi/riptable/rt_datetime/index.html)**
classes replace most NumPy and Pandas date/time classes. Riptable's `DateTimeNano`,
`Date`, `TimeSpan`, and `DateSpan` classes have a design that's closer to Java, C++,
or C# date/time classes.

**[Accum2](https://riptable.readthedocs.io/en/stable/autoapi/riptable/rt_accum2/index.html)**
and **[AccumTable](https://riptable.readthedocs.io/en/stable/autoapi/riptable/rt_accumtable/index.html)**
enable cross-tabulation functionality.

**[SDS](https://riptable.readthedocs.io/en/stable/autoapi/riptable/rt_sds/index.html)**
provides a new file format which can stack multiple datasets in multiple files with
[zstd](https://github.com/facebook/zstd) compression, threads, and no extra memory
copies.

Small, medium, and large array performance
------------------------------------------

Riptable is designed for arrays of *all* sizes. For small arrays (< 100 length), low
processing overhead is important. Riptable's `FastArray` is written in hand-coded C and
processes simple arithmetic functions faster than NumPy arrays. For medium arrays
(< 100,000 length), Riptable has vector-instrinic loops. For large arrays (>= 100,000)
Riptable knows how to dynamically scale out threading, waking up threads efficiently
using a [futex](https://man7.org/linux/man-pages/man7/futex.7.html).

Install and import Riptable
---------------------------

Create a Conda environment and run this command to install Riptable on Windows or Linux:

```
conda install riptable
```

Import Riptable in your Python code to access its functions, methods, and classes:

```
import riptable as rt
```

>**Note**: We shorten the name of the Riptable module to `rt` to improve the readability
of code.

Use NumPy arrays with Riptable
------------------------------

Easily change between NumPy's `ndarray` and Riptable's `FastArray` without producing a
copy of the array.

```
import riptable as rt
import numpy as np
rtarray = rt.arange(100)
numpyarray = rtarray._np
fastarray = rt.FastArray(numpyarray)
```

Change the view of the two instances to confirm that `FastArray` is a subclass of
`ndarray`.

```
numpyarray.view(rt.FastArray)
fastarray.view(np.ndarray)
isinstance(fastarray, np.ndarray)
```

Use Pandas DataFrames with Riptable
-----------------------------------

Construct a Riptable `Dataset` directly from a Pandas `DataFrame`.

```
import riptable as rt
import numpy as np
import pandas as pd
df = pd.DataFrame({"intarray": np.arange(1_000_000), "floatarray": np.arange(1_000_000.0)})
ds = rt.Dataset(df)
```

How can I trust Riptable calculations?
--------------------------------------

Riptable has undergone years of development, and dozens of quants at a large financial
firm have tested its capabilities. We also provide a full suite of
[tests](https://github.com/rtosholdings/riptable/tree/master/riptable/tests) to ensure
that the modules are functioning as expected. But as with any project, there are still
bugs and opportunities for improvement, which can be reported using GitHub issues.

How can Riptable perform calculations faster?
---------------------------------------------

Riptable was written from day one to handle large data and multithreading using the
riptide_cpp layer for basic arithmetic functions and algorithms. Many core algorithms
have been painstakingly rewritten for multithreading.

How can I contribute?
---------------------

The Riptable engine is another building block for Python data analytics computing, and
we welcome help from users and contributors to take it to the next level. As you
encounter bugs, issues with the documentation, and opportunities for new or improved
functionality, please consider reaching out to the team.

See the [contributing guide](https://github.com/rtosholdings/riptable/blob/master/docs/CONTRIBUTING.md)
for more information.
