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.8.0.tar.gz (239.9 kB view details)

Uploaded Source

Built Distributions

temporian-0.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (716.3 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

temporian-0.8.0-cp311-cp311-macosx_14_0_x86_64.whl (660.5 kB view details)

Uploaded CPython 3.11 macOS 14.0+ x86-64

temporian-0.8.0-cp311-cp311-macosx_14_0_arm64.whl (655.5 kB view details)

Uploaded CPython 3.11 macOS 14.0+ ARM64

temporian-0.8.0-cp311-cp311-macosx_13_0_x86_64.whl (660.5 kB view details)

Uploaded CPython 3.11 macOS 13.0+ x86-64

temporian-0.8.0-cp311-cp311-macosx_13_0_arm64.whl (655.5 kB view details)

Uploaded CPython 3.11 macOS 13.0+ ARM64

temporian-0.8.0-cp311-cp311-macosx_12_0_x86_64.whl (671.4 kB view details)

Uploaded CPython 3.11 macOS 12.0+ x86-64

temporian-0.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (716.4 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

temporian-0.8.0-cp310-cp310-macosx_14_0_x86_64.whl (659.4 kB view details)

Uploaded CPython 3.10 macOS 14.0+ x86-64

temporian-0.8.0-cp310-cp310-macosx_14_0_arm64.whl (654.2 kB view details)

Uploaded CPython 3.10 macOS 14.0+ ARM64

temporian-0.8.0-cp310-cp310-macosx_13_0_x86_64.whl (659.4 kB view details)

Uploaded CPython 3.10 macOS 13.0+ x86-64

temporian-0.8.0-cp310-cp310-macosx_13_0_arm64.whl (654.2 kB view details)

Uploaded CPython 3.10 macOS 13.0+ ARM64

temporian-0.8.0-cp310-cp310-macosx_12_0_x86_64.whl (670.2 kB view details)

Uploaded CPython 3.10 macOS 12.0+ x86-64

temporian-0.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (717.7 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

temporian-0.8.0-cp39-cp39-macosx_14_0_x86_64.whl (659.5 kB view details)

Uploaded CPython 3.9 macOS 14.0+ x86-64

temporian-0.8.0-cp39-cp39-macosx_14_0_arm64.whl (654.5 kB view details)

Uploaded CPython 3.9 macOS 14.0+ ARM64

temporian-0.8.0-cp39-cp39-macosx_13_0_x86_64.whl (659.5 kB view details)

Uploaded CPython 3.9 macOS 13.0+ x86-64

temporian-0.8.0-cp39-cp39-macosx_13_0_arm64.whl (654.5 kB view details)

Uploaded CPython 3.9 macOS 13.0+ ARM64

temporian-0.8.0-cp39-cp39-macosx_12_0_x86_64.whl (670.3 kB view details)

Uploaded CPython 3.9 macOS 12.0+ x86-64

temporian-0.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (714.4 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

temporian-0.8.0-cp38-cp38-macosx_14_0_x86_64.whl (659.3 kB view details)

Uploaded CPython 3.8 macOS 14.0+ x86-64

temporian-0.8.0-cp38-cp38-macosx_14_0_arm64.whl (654.1 kB view details)

Uploaded CPython 3.8 macOS 14.0+ ARM64

temporian-0.8.0-cp38-cp38-macosx_13_0_x86_64.whl (659.3 kB view details)

Uploaded CPython 3.8 macOS 13.0+ x86-64

temporian-0.8.0-cp38-cp38-macosx_13_0_arm64.whl (654.1 kB view details)

Uploaded CPython 3.8 macOS 13.0+ ARM64

temporian-0.8.0-cp38-cp38-macosx_12_0_x86_64.whl (670.1 kB view details)

Uploaded CPython 3.8 macOS 12.0+ x86-64

File details

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

File metadata

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

File hashes

Hashes for temporian-0.8.0.tar.gz
Algorithm Hash digest
SHA256 f61761b113612e429b3bc6fe83badfca8bb7935936a50d1df71676de8fea7f7f
MD5 87f4299928965a31b34523d1b766f96d
BLAKE2b-256 2e8f4aa5cde367da032eec9ecca78b345d0d8c0997ff4ac6671ed07260cf9360

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ff4b67b2686210f871f48fc99a11caf4fe1dcb7a7d82b003a47193078e2e4114
MD5 2ca10912cbdd80e0c7a10a8eb9847f6a
BLAKE2b-256 fee0cefb9e3909baff8daa56b52559c3abe8fc31fd1b625fabfb514084b28f9f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.8.0-cp311-cp311-macosx_14_0_x86_64.whl
Algorithm Hash digest
SHA256 66a469da2041ba7bc4dcb36c9d16b8004e299b7dfe069c4dd9bb54a77a250d1f
MD5 94d787c53d3a6785e3bd61cf50ed80d9
BLAKE2b-256 791a6a5801502fc5a9c8dc7c77d1bff92b7753594558173fd704d3a3e7fa4ff4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.8.0-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 5ee9b05e24643eb5916c732a1d648879a6bae94da1daa8aa6bca43d999f56b0c
MD5 690abc0bc362a95734553d75b22bd858
BLAKE2b-256 cebdbde3eec7fa50a29843c491bccd15e45fef8371241bea8c30ca53067d0076

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.8.0-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 f8d42ce0d9d9f0be60928968b28e3f23ffd17c7ffc07cba384c0ba181d4bcdfa
MD5 21a4268a81035fc35cc84168ebee0e12
BLAKE2b-256 c842a1d1cdabe2414633ce627033135699efb560f06a382bfbc5946384934bf9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.8.0-cp311-cp311-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 213e9a992aa4a61c55685e48a5f317119c30dbbe11374492087a878656c52523
MD5 30991e002e253962a20d7801ae8d06b9
BLAKE2b-256 58f3c1a08d0ade8669d80fff8058a53cb232f2ecec0d5faa3455abfd8f5bd581

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.8.0-cp311-cp311-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 4f28fcb85f538b35e694cb193bb0d15ea4d3036c2c1395825268760c44ae9598
MD5 8ef001526585d3017cd54d13404b1b5d
BLAKE2b-256 ea094f4a40db1d0c77d7b1ad099e6cb6819e984c7ef357d2e1dc76e45f340cab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4a3a383105b09c1d841e964e594ea0bdaf299323373e0f9a7616af22804e6f86
MD5 06278cdf081814798ea65b95a2ce15f2
BLAKE2b-256 b1729f73f137d5dd9d7e503020d5c72638af3ab35909205c68b3eade15519bda

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.8.0-cp310-cp310-macosx_14_0_x86_64.whl
Algorithm Hash digest
SHA256 63d214dd95332bd565347db705f111596369e6e287afd16dbf7da8e7c51a8d85
MD5 24957a8499521a7dad6bc3fa0dcc166e
BLAKE2b-256 e3bbae2f49f416369b7b56837baa7e4bd62a29a3d1421fa7b65e4e1478c77903

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.8.0-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 04dd24943cb43e82e2cf00925237fd8245797a4c520e9fc56a4ca425a759619e
MD5 3d001346161fb74daaaea15e2c36b134
BLAKE2b-256 000f33eefce1ec65a68f16aa164a7a35baa45c6ae68aeff88a288009b4ff3e11

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.8.0-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 922571d3140eb11ee39c5f2fcf8b8f39a8dda6ec0cbe5c92d91a343999377416
MD5 e6543f57dd2d4cb4c86ead1661401e48
BLAKE2b-256 436f8449d67c20afe1a5d1007ff3456976af4e616975bbdb4871456d0f12da83

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.8.0-cp310-cp310-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 9d50f4d0d770f867402d9741608571db59ccde21afe7a512c88462858513afa4
MD5 752cf9a7319349b56b352d66be9b5f11
BLAKE2b-256 d5d1a45dafeba3348d04556de62c00f44e2aa64ac93f0ebbb9f83099d104fa0a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.8.0-cp310-cp310-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 8239e46af487d1beeebfe5423e67a8aa81b176bb4f16649adfc5448cf1143bb5
MD5 560015e190055a4df10c5deaef913fbb
BLAKE2b-256 eefdb622009c7f3db761685d4aaf1c484812b5151763de3871ecc647352ae369

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 39eb4a6696373ecee7db0f0cfa8b428d75582bcfdda6f02e96a110155397375a
MD5 32e7b47bba2a0122424bbf3d7dd13eff
BLAKE2b-256 920186d7d2a46a0df7028237cf51c767a08fa3955a53551b5fad85c70b802ea3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.8.0-cp39-cp39-macosx_14_0_x86_64.whl
Algorithm Hash digest
SHA256 5ddcfbe52a24225afb2dfa542bad9b4cdce79a66724f032b3d333b1d4b833044
MD5 fae467340265ac656aa73f005f3a008b
BLAKE2b-256 3bbb2404100efb8333cf78fc65f5f1f25c54eeae643db80eefd31037a496b010

See more details on using hashes here.

File details

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

File metadata

  • Download URL: temporian-0.8.0-cp39-cp39-macosx_14_0_arm64.whl
  • Upload date:
  • Size: 654.5 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-1016-azure

File hashes

Hashes for temporian-0.8.0-cp39-cp39-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 bad1d90b7749801bb58511e460c329cd276fb9fbaa9f5c098fe53d07c9c9b10f
MD5 bf66b493353a8584f177009d224d263b
BLAKE2b-256 e85bafcc658b04fedb00b4eeb049ed84c908ec94c0fe1343c70d8da88347610d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.8.0-cp39-cp39-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 91c4f9e3fb26dbabb9e2d3c4f7838f2e166b50747f6208e38a7ba821a1560325
MD5 972b14493ad14a9ffbb9693374aeb993
BLAKE2b-256 cdbb2c816dd9b53772af0c88cd55970a93d6103809c28a41e7414f38d5738df2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: temporian-0.8.0-cp39-cp39-macosx_13_0_arm64.whl
  • Upload date:
  • Size: 654.5 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-1016-azure

File hashes

Hashes for temporian-0.8.0-cp39-cp39-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 6918780487d2e354818c2f62fbd8e3bc5c83dfa60cd96ef11f136b40463ca6cd
MD5 390c4c0445e496e504a8fc6d005a8767
BLAKE2b-256 79de087d9b81991803827e613d75e00a90462269d5793392942d1e67fde17308

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.8.0-cp39-cp39-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 09b67a07f68a4f2f9d9f0265501a57fc5f1eeb39f5c5a127ebe26b8b1dfa22a5
MD5 c05f19b91369244dd3c846167d4850d8
BLAKE2b-256 a339359605961a10581cca63deefff5ff694ad871518dcd10e19c7b2e0ded7ae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 363119e477acc2978be551eca6ccf5b58af73be690e01184a668781ca2e32d14
MD5 5c2bd6b7cdcd4d9fea71f4c84f517fe9
BLAKE2b-256 791e29649a1450cd74d185a1b1c216030311a9eb7d4e94fa6aa8ac767e0bc14e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.8.0-cp38-cp38-macosx_14_0_x86_64.whl
Algorithm Hash digest
SHA256 674e6c8b534da5dda2d5c27d03455375779bba5dc58b9d94a8194960333a1bfe
MD5 d91e01b62af7bacc8a6cf0d2015a8b42
BLAKE2b-256 2e2ff75ebf238836f90b3c1737d7a8d035aedd07385a2060a2e2dc01e30798d5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: temporian-0.8.0-cp38-cp38-macosx_14_0_arm64.whl
  • Upload date:
  • Size: 654.1 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-1016-azure

File hashes

Hashes for temporian-0.8.0-cp38-cp38-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 acef115851cd7f6f8441c68b1626f2ad3c1a228d101e0ba336c5574a390dfd1f
MD5 818761650921261b84bd2c489cd18be3
BLAKE2b-256 c640fbca4a5f220c16e199f0d568c32b182f0f52f138b789800d285684383657

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.8.0-cp38-cp38-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 afbc45dfb25674cbcdaa827a9b321753a1c33a8ef89cd1ce1492ea6edbcd0495
MD5 43e048f2a721d8ac66cdaa0bd4fbf9dc
BLAKE2b-256 c1fc743b44d2c7f8c9c8ee1dd9241f4d680ebba6f22ac916eb089e17dbe0261d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: temporian-0.8.0-cp38-cp38-macosx_13_0_arm64.whl
  • Upload date:
  • Size: 654.1 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-1016-azure

File hashes

Hashes for temporian-0.8.0-cp38-cp38-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 cc5203bec95ce0c89b51fb71bd3ef8125afda4a08aaa28fbbac35aff9b5f1624
MD5 051fcd30d4d34b9baa3c94bdd7dfa928
BLAKE2b-256 84b9879383afdab3abaa3ad544ebcd24de045a7a73086372d13c70c257705156

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.8.0-cp38-cp38-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 50c535429ba54d14956c4fb7bc3e68d18ff80f294d5236c2db68716caff42512
MD5 8a4da8ada538bd7f4c7f482a0fb02d48
BLAKE2b-256 d078eafffc2a0e0fd3ed0b0bb8be89e00f595d7e800da0e70a4f9f2b4707ce05

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