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

pypi docs tests formatting publish

Temporian is a library for safe, simple and efficient preprocessing and feature engineering of temporal data in Python. Temporian supports multivariate time-series, multivariate time-sequences, event logs, and cross-source event streams.

Temporian is to temporal data what Pandas is to tabular data.

Key features

  • Supports most types of temporal data 📈: Handles both uniformly sampled and non-uniformly sampled data, both single-variate and multivariate data, both flat and multi-index data, and both mono-source and multi-source non-synchronized events.

  • Optimized for Temporal data 🔥: Temporian's core computation is implemented in C++ and optimized for temporal data. Temporian can be more than 1,000x faster than off-the-shelf data processing libraries when operating on temporal data.

  • Easy to integrate into an existing ML ecosystem: Temporian does not perform any ML model training - instead it integrates seamlessly with any ML library, such as PyTorch, Scikit-Learn, Jax, TensorFlow, XGBoost, or Yggdrasil Decision Forests.

  • Prevents unwanted future leakage 😰: Unless explicitly specified with tp.leak, feature computation cannot depend on future data, thereby preventing unwanted, hard-to-debug, and potentially costly future leakage.

Quickstart

Installation

Install Temporian from PyPI with pip:

pip install temporian -U

Temporian is currently available for Linux and MacOS (ARM and Intel). Windows support is under development.

Minimal example

Consider sale records that contain contain the timestamp, store, and revenue of individual sales.

$ cat sales.csv
timestamp,store,revenue
2023-12-04 21:21:05,STORE_31,5071
2023-11-08 17:14:38,STORE_4,1571
2023-11-29 21:44:46,STORE_49,6101
2023-12-20 18:17:14,STORE_18,4499
2023-12-15 10:55:09,STORE_2,6666
...

Our goal is to compute the sum of revenue for each store at 11 pm every weekday (excluding weekends).

First, we load the data and list the workdays.

import temporian as tp

# Load sale transactions
sales = tp.from_csv("sales.csv")

# Index sales per store
sales_per_store = sales.add_index("store")

# List work days
days = sales_per_store.tick_calendar(hour=22)
work_days = (days.calendar_day_of_week() <= 5).filter()

work_days.plot(max_num_plots=1)

Then, we sum the daily revenue for each workday and each store.

# Aggregate revenue per store and per work day
daily_revenue = sales_per_store["revenue"].moving_sum(tp.duration.days(1), sampling=work_days).rename("daily_revenue")

# Plot the results
daily_revenue.plot(max_num_plots=3)

Finally, we can export the result as a Pandas DataFrame for further processing or for consumption by other libraries.

tp.to_pandas(daily_revenue)

Check the Getting Started tutorial to find out more!

Next steps

New users should refer to the Getting Started guide, which provides a quick overview of the key concepts and operations of Temporian.

After that, visit the User Guide for a deep dive into the major concepts, operators, conventions, and practices of Temporian. For a hands-on learning experience, work through the Tutorials or refer to the API reference.

If you need help, have a question, want to contribute, or just want to be a part of the Temporian community, we encourage you to join our Discord server! 🤝🏼

Documentation

The documentation 📚 is available at temporian.readthedocs.io. The Getting Started guide is the best way to start.

Contributing

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

Credits

Temporian is developed in 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.9.0.tar.gz (255.6 kB view details)

Uploaded Source

Built Distributions

temporian-0.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (760.3 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

temporian-0.9.0-cp311-cp311-macosx_14_0_x86_64.whl (704.5 kB view details)

Uploaded CPython 3.11 macOS 14.0+ x86-64

temporian-0.9.0-cp311-cp311-macosx_14_0_arm64.whl (699.8 kB view details)

Uploaded CPython 3.11 macOS 14.0+ ARM64

temporian-0.9.0-cp311-cp311-macosx_13_0_x86_64.whl (704.3 kB view details)

Uploaded CPython 3.11 macOS 13.0+ x86-64

temporian-0.9.0-cp311-cp311-macosx_13_0_arm64.whl (699.8 kB view details)

Uploaded CPython 3.11 macOS 13.0+ ARM64

temporian-0.9.0-cp311-cp311-macosx_12_0_x86_64.whl (716.0 kB view details)

Uploaded CPython 3.11 macOS 12.0+ x86-64

temporian-0.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (760.6 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

temporian-0.9.0-cp310-cp310-macosx_14_0_x86_64.whl (703.3 kB view details)

Uploaded CPython 3.10 macOS 14.0+ x86-64

temporian-0.9.0-cp310-cp310-macosx_14_0_arm64.whl (698.5 kB view details)

Uploaded CPython 3.10 macOS 14.0+ ARM64

temporian-0.9.0-cp310-cp310-macosx_13_0_x86_64.whl (703.4 kB view details)

Uploaded CPython 3.10 macOS 13.0+ x86-64

temporian-0.9.0-cp310-cp310-macosx_13_0_arm64.whl (698.5 kB view details)

Uploaded CPython 3.10 macOS 13.0+ ARM64

temporian-0.9.0-cp310-cp310-macosx_12_0_x86_64.whl (714.5 kB view details)

Uploaded CPython 3.10 macOS 12.0+ x86-64

temporian-0.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (761.9 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

temporian-0.9.0-cp39-cp39-macosx_14_0_x86_64.whl (703.5 kB view details)

Uploaded CPython 3.9 macOS 14.0+ x86-64

temporian-0.9.0-cp39-cp39-macosx_14_0_arm64.whl (698.8 kB view details)

Uploaded CPython 3.9 macOS 14.0+ ARM64

temporian-0.9.0-cp39-cp39-macosx_13_0_x86_64.whl (703.5 kB view details)

Uploaded CPython 3.9 macOS 13.0+ x86-64

temporian-0.9.0-cp39-cp39-macosx_13_0_arm64.whl (698.8 kB view details)

Uploaded CPython 3.9 macOS 13.0+ ARM64

temporian-0.9.0-cp39-cp39-macosx_12_0_x86_64.whl (714.6 kB view details)

Uploaded CPython 3.9 macOS 12.0+ x86-64

temporian-0.9.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (758.5 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

temporian-0.9.0-cp38-cp38-macosx_14_0_x86_64.whl (703.2 kB view details)

Uploaded CPython 3.8 macOS 14.0+ x86-64

temporian-0.9.0-cp38-cp38-macosx_14_0_arm64.whl (698.4 kB view details)

Uploaded CPython 3.8 macOS 14.0+ ARM64

temporian-0.9.0-cp38-cp38-macosx_13_0_x86_64.whl (703.3 kB view details)

Uploaded CPython 3.8 macOS 13.0+ x86-64

temporian-0.9.0-cp38-cp38-macosx_13_0_arm64.whl (698.4 kB view details)

Uploaded CPython 3.8 macOS 13.0+ ARM64

temporian-0.9.0-cp38-cp38-macosx_12_0_x86_64.whl (714.4 kB view details)

Uploaded CPython 3.8 macOS 12.0+ x86-64

File details

Details for the file temporian-0.9.0.tar.gz.

File metadata

  • Download URL: temporian-0.9.0.tar.gz
  • Upload date:
  • Size: 255.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.12 Linux/6.5.0-1018-azure

File hashes

Hashes for temporian-0.9.0.tar.gz
Algorithm Hash digest
SHA256 437c34fa5d8f4f24eb0bb8f41e6888e02fd6e7e252a0e12a71e70da1e35cd869
MD5 3e4d3e4d1e331c0e9c5e631760b3154e
BLAKE2b-256 5bf1655bbe5efdc29f5f90168d53e36655003cd3fe743da8c2ef8763ce0a7772

See more details on using hashes here.

File details

Details for the file temporian-0.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for temporian-0.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 02f7eebbc89e26d887e0a3ba97d02e187831c23334aa7298f229c6387580f5d6
MD5 edbd204482ea2aa0df38b793433b5ab7
BLAKE2b-256 749b8e112e04e0e60963c65ba162309ec9c3c509a5ae2d3610ea3bfa7ff2650a

See more details on using hashes here.

File details

Details for the file temporian-0.9.0-cp311-cp311-macosx_14_0_x86_64.whl.

File metadata

File hashes

Hashes for temporian-0.9.0-cp311-cp311-macosx_14_0_x86_64.whl
Algorithm Hash digest
SHA256 fcaed23f626713a9aa00e89e7226b00a13fa0eb0aaf919c663b6c779a21479b5
MD5 b46c79083422be86eec45b3c419dcea6
BLAKE2b-256 a5fba5eecf2860f9b88a3a41af5c5ac6c5cb81690ad5ed84bf76d871b77903ad

See more details on using hashes here.

File details

Details for the file temporian-0.9.0-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for temporian-0.9.0-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 90a0145afe0c46818408a8c993aced489e215d493d40b11ae33a3a166fbf9c73
MD5 29b113fe2177cc4aa33e7126c03dd3c9
BLAKE2b-256 0083bf3dcff9eceb058b3df2824c7ce3553c2b51c02ab3e7c5e069af431b3b7d

See more details on using hashes here.

File details

Details for the file temporian-0.9.0-cp311-cp311-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for temporian-0.9.0-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 a247996b14c92351cce4b646adb5e97c520a8b90e08c7bf83910df0f0b4ce43a
MD5 acf29eaae6f849bf2d8fe8c9ab8db2e4
BLAKE2b-256 0159c791d7823bffc429818500d6b2b38b675721ef116c9217d1287fdc903c16

See more details on using hashes here.

File details

Details for the file temporian-0.9.0-cp311-cp311-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for temporian-0.9.0-cp311-cp311-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 de78875a7787bc8b59dd4def43ceaef718c96f86efc8dd14d2702567b934fa91
MD5 0a91997f499ed155c352ca548a390f84
BLAKE2b-256 cd42c3e02eac60562443c885bf790dd41ebfdc72143ca8d9cd9bd2f0f7922923

See more details on using hashes here.

File details

Details for the file temporian-0.9.0-cp311-cp311-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for temporian-0.9.0-cp311-cp311-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 34536180fcfb7189c8734ba68ae166821e15cad57b4907a94c2c70a221d93e42
MD5 fde660d8f790b104036de62b9972458f
BLAKE2b-256 b1c6a585d42d1a73c174a353abb5661e94e6fad7fde32aea10b052a10cfeb1af

See more details on using hashes here.

File details

Details for the file temporian-0.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for temporian-0.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f52fdb1de2783393803850025d9d7b7c1e33a29abb9c858b877998508da257e1
MD5 b618c5f10ac5e6344a1ae03f09a0adf7
BLAKE2b-256 73b2421eb0ea53470759c3336d7f102cc380e2673c5c6338ec2bf4415214eb0a

See more details on using hashes here.

File details

Details for the file temporian-0.9.0-cp310-cp310-macosx_14_0_x86_64.whl.

File metadata

File hashes

Hashes for temporian-0.9.0-cp310-cp310-macosx_14_0_x86_64.whl
Algorithm Hash digest
SHA256 a30e62a9b664c8b8e7e3448f286e8719a101be947b85e22c934ad65b457de953
MD5 81b2ccd4b27fd4fd9cead8e4ab8a1284
BLAKE2b-256 2364d690e37971a1fc7c82f99cba08974500d452014e2e1e64134bd71fe0fd57

See more details on using hashes here.

File details

Details for the file temporian-0.9.0-cp310-cp310-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for temporian-0.9.0-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 bcd4e09808593166b2e4647af3558a512e8e40b923bb8ab3068acb00007c1ac7
MD5 c75a15b19a036bf7bbc1864d7b6c9db6
BLAKE2b-256 466285581933b6db451f16070509d2c172f509787350b1f2e4c0fda45fb9755e

See more details on using hashes here.

File details

Details for the file temporian-0.9.0-cp310-cp310-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for temporian-0.9.0-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 d89dc1cf8125323483c8ee1bdacf6c2cace5a4885da59d9b1b02bd7be69600a8
MD5 f67abfda36092cf842329f244e288403
BLAKE2b-256 379955e643f54cc290027b73339f9acbcae83afb7a7684a765b47b382f2a73ee

See more details on using hashes here.

File details

Details for the file temporian-0.9.0-cp310-cp310-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for temporian-0.9.0-cp310-cp310-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 d8809e7656a56482e235dd909fd2efd46d3f123cf91f7a496f753e83cb8a4592
MD5 aa631b267d7039c6fb99af913d24d96b
BLAKE2b-256 b9eba9d4e664c8249c42ad8f45fbdc12dd2e50f91c909ffd05c632102547bfb6

See more details on using hashes here.

File details

Details for the file temporian-0.9.0-cp310-cp310-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for temporian-0.9.0-cp310-cp310-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 dcab698f5e562be940861a3328c3447eb663c4857c5637d88bb572584cc8bed8
MD5 3bf41ad44b192141b0e6e0ecd919bb35
BLAKE2b-256 a202684d0813f67cda36cb95cb0cd36bca58cb105f6476bfd29a22039bd70d0a

See more details on using hashes here.

File details

Details for the file temporian-0.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for temporian-0.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a98f04d57da15e7989ea4d242ecef2ad25325bced4d14997f8db870b5baf6a4b
MD5 8bfb6503762ae5f0b2523c7b037ab8bc
BLAKE2b-256 fe01c6525f122dde025eff70bb983fe3862f5eeb372b5a01ed3a58f9c6d44e47

See more details on using hashes here.

File details

Details for the file temporian-0.9.0-cp39-cp39-macosx_14_0_x86_64.whl.

File metadata

File hashes

Hashes for temporian-0.9.0-cp39-cp39-macosx_14_0_x86_64.whl
Algorithm Hash digest
SHA256 98fcb700c7b708e62e5b53f56cb99b445944dc4a6d0f218ec38d0b1744a75b26
MD5 d5836ddb072ed9619fcf81de3df0885d
BLAKE2b-256 693ca34c187de605629edcacd5c8b91a1084f1bc0a97914e73fa50999a971e21

See more details on using hashes here.

File details

Details for the file temporian-0.9.0-cp39-cp39-macosx_14_0_arm64.whl.

File metadata

  • Download URL: temporian-0.9.0-cp39-cp39-macosx_14_0_arm64.whl
  • Upload date:
  • Size: 698.8 kB
  • Tags: CPython 3.9, macOS 14.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.12 Linux/6.5.0-1018-azure

File hashes

Hashes for temporian-0.9.0-cp39-cp39-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 a0a1344a0e5da7f72ec8bac6fc6c3f1812422f2c7cf37206a0925f4418d0265f
MD5 f903750af06e29334f7a08e7acd6906f
BLAKE2b-256 c4a414990a9233b2108c1f7e00c4c77d8653f47a993d8d404a54e2bdd01bb739

See more details on using hashes here.

File details

Details for the file temporian-0.9.0-cp39-cp39-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for temporian-0.9.0-cp39-cp39-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 094f57fcc648f610d571d03b4024b5baa6c4e3c61e36f382db0e31e91dd5b81b
MD5 fda08da0217a4972051ef16d8ed3c59e
BLAKE2b-256 831e7d09c764b86a187f91806c916d5701bea40acea4faaf75c036a9b8367dd6

See more details on using hashes here.

File details

Details for the file temporian-0.9.0-cp39-cp39-macosx_13_0_arm64.whl.

File metadata

  • Download URL: temporian-0.9.0-cp39-cp39-macosx_13_0_arm64.whl
  • Upload date:
  • Size: 698.8 kB
  • Tags: CPython 3.9, macOS 13.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.12 Linux/6.5.0-1018-azure

File hashes

Hashes for temporian-0.9.0-cp39-cp39-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 4c45f5cbbee81f1c40641a00d2ff30eb2137534e2a4dd276dc0bfd082a84b9e8
MD5 46beae92f54dc1d5cc8d66babfb29ffd
BLAKE2b-256 bb8f87f5a8387a6783d9ba3f5feec355699f1da3bd71239db077d35e618e7e74

See more details on using hashes here.

File details

Details for the file temporian-0.9.0-cp39-cp39-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for temporian-0.9.0-cp39-cp39-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 32fe0ae23250139be343c8602d0646ee8445e18d717dc5efa3189c8707ea2bbc
MD5 7aa913e24a34be472034e3395ebe3cfe
BLAKE2b-256 6c887c4700fc956e3ccf24a02fc4ef23ba74e9952b1793ecec50d3da61b98a60

See more details on using hashes here.

File details

Details for the file temporian-0.9.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for temporian-0.9.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5c8d483415426b0556f3dffb855680ac13f604d613fdcdcd7a8c863a66887b4e
MD5 7039f2d5006363fdcd1b2648d2c1be97
BLAKE2b-256 7e207913413caec744103938317d0f30cb85b043eb1fdf4c74e1e7a4aa866092

See more details on using hashes here.

File details

Details for the file temporian-0.9.0-cp38-cp38-macosx_14_0_x86_64.whl.

File metadata

File hashes

Hashes for temporian-0.9.0-cp38-cp38-macosx_14_0_x86_64.whl
Algorithm Hash digest
SHA256 2ed98b4571d294ecff9b308ea20323245085598ea9b998c276aa11519d83a96f
MD5 41ffd54df4d3c6513cd9c79fca5226a0
BLAKE2b-256 5567fcedfefdb9a553cf20128333b01e3702ef5e6b11810dbaaefbc11eaa4d15

See more details on using hashes here.

File details

Details for the file temporian-0.9.0-cp38-cp38-macosx_14_0_arm64.whl.

File metadata

  • Download URL: temporian-0.9.0-cp38-cp38-macosx_14_0_arm64.whl
  • Upload date:
  • Size: 698.4 kB
  • Tags: CPython 3.8, macOS 14.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.12 Linux/6.5.0-1018-azure

File hashes

Hashes for temporian-0.9.0-cp38-cp38-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 403e12fd1cfaa752277f3caadad0c186cc2669b9daab2387312c9f6e2ca36a79
MD5 7edc52e533a8fd09a8fef08a2bd76e71
BLAKE2b-256 7c947b2e2c553bc8b075c5b5aba784e58e2f078d9294e4670920a95c5db2167e

See more details on using hashes here.

File details

Details for the file temporian-0.9.0-cp38-cp38-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for temporian-0.9.0-cp38-cp38-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 935bd698507225b02ffbf631076482d194b1692c4a0c88cb8d6e4ffe8f77e3f1
MD5 f2de0dcc85dd76f65dcab6ecb08540f9
BLAKE2b-256 9d7b73b3574c1fbff588686fb8aaee99873bf587f1a333941a21e1bd2724a15f

See more details on using hashes here.

File details

Details for the file temporian-0.9.0-cp38-cp38-macosx_13_0_arm64.whl.

File metadata

  • Download URL: temporian-0.9.0-cp38-cp38-macosx_13_0_arm64.whl
  • Upload date:
  • Size: 698.4 kB
  • Tags: CPython 3.8, macOS 13.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.12 Linux/6.5.0-1018-azure

File hashes

Hashes for temporian-0.9.0-cp38-cp38-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 4b511f6b8ef70d4dd6bf22a87927139654c024f0b595d94c51bae10b6053f0a0
MD5 acb5c6d4ac37e260a2c734354c7effa7
BLAKE2b-256 12f79d9b5dbb1298b0948d4baf9c829368742be573fdaf408e1e572972a0e12a

See more details on using hashes here.

File details

Details for the file temporian-0.9.0-cp38-cp38-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for temporian-0.9.0-cp38-cp38-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 5e5ff45ba60ded0737c60f89eaf045baa50c8d2ab9d5499d6f9287f94b0ab33e
MD5 e647719798ef8a32f38a6ddc506d5bf9
BLAKE2b-256 600b321defb07863cf04e4488e7377576487e6b921765d571d2c49597cf3df65

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