Skip to main content

Temporian is a Python package for feature engineering of temporal data, focusing on preventing common modeling errors and providing a simple and powerful API, a first-class iterative development experience, and efficient and well-tested implementations of common and not-so-common temporal data preprocessing functions.

Project description

Temporian logo

tests formatting docs

Temporian is a Python package for feature engineering of temporal data, focusing on preventing common modeling errors and providing a simple and powerful API, a first-class iterative development experience, and efficient and well-tested implementations of common and not-so-common temporal data preprocessing functions.

Installation

Temporian is available on PyPI. To install it, run:

pip install temporian

Getting Started

This is how a minimal end-to-end example looks like:

import temporian as tp

# Load data and create input node.
evset = tp.from_csv("temporal_data.csv", timestamp_column="date")
source = evset.node()

# Apply operators to create a processing graph.
sma = tp.simple_moving_average(source, window_length=tp.duration.days(7))

# Run the graph.
result_evset = sma.evaluate({source: evset})

# Show output.
print(result_evset)
result_evset.plot()

This is an example temporal_data.csv to use with the code above:

date,feature_1,feature_2
2023-01-01,10.0,3.0
2023-01-02,20.0,4.0
2023-02-01,30.0,5.0

Check the Getting Started tutorial to try it out!

Key features

These are what set Temporian apart.

  • Simple and powerful API: Temporian exports high level operations making processing complex programs short and ready to read.
  • Flexible data model: Temporian models temporal data as a sequence of events, supporting non-uniform sampling timestamps seamlessly.
  • Prevents modeling errors: Temporian programs are guaranteed not to have future leakage unless explicitly specified, ensuring that models are not trained on future data.
  • Iterative development: Temporian can be used to develop preprocessing pipelines in Colab or local notebooks, allowing users to visualize results each step of the way to identify and correct errors early on.
  • Efficient and well-tested implementations: Temporian contains efficient and well-tested implementations of a variety of temporal data processing functions. For instance, our implementation of window operators is x2000 faster than the same function implemented with NumPy.
  • Wide range of preprocessing functions: Temporian contains a wide range of preprocessing functions, including moving window operations, lagging, calendar features, arithmetic operations, index manipulation and propagation, resampling, and more. For a full list of the available operators, see the operators documentation.

Documentation

The official documentation is available at temporian.readthedocs.io.

Contributing

Contributions to Temporian are welcome! Check out the contributing guide to get started.

Credits

This project is a collaboration between Google and Tryolabs.

Download files

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

Source Distribution

temporian-0.1.1.tar.gz (132.3 kB view hashes)

Uploaded Source

Built Distributions

temporian-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (432.7 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

temporian-0.1.1-cp311-cp311-macosx_12_0_x86_64.whl (389.5 kB view hashes)

Uploaded CPython 3.11 macOS 12.0+ x86-64

temporian-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (432.1 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

temporian-0.1.1-cp310-cp310-macosx_12_0_x86_64.whl (388.0 kB view hashes)

Uploaded CPython 3.10 macOS 12.0+ x86-64

temporian-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (433.3 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

temporian-0.1.1-cp39-cp39-macosx_12_0_x86_64.whl (388.1 kB view hashes)

Uploaded CPython 3.9 macOS 12.0+ x86-64

temporian-0.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (431.9 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

temporian-0.1.1-cp38-cp38-macosx_12_0_x86_64.whl (387.9 kB view hashes)

Uploaded CPython 3.8 macOS 12.0+ x86-64

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