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

Note Temporian development is in alpha.

Temporian is an open-source Python library for preprocessing ⚡ and feature engineering 🛠 temporal data 📈 for machine learning applications 🤖. It is a library tailor-made to address the unique characteristics and complexities of time-related data, such as time-series and transactional data.

Temporal data is any form of data that represents a state in time. In Temporian, temporal datasets contain events, which consists of values for one or more attributes at a given timestamp. Common examples of temporal data are transaction logs, sensor signals, and weather patterns. For more, see What is Temporal data.

Key features

  • Unified data processing 📈: Temporian operates natively on many forms of temporal data, including multivariate time-series, multi-index time-series, and non-uniformly sampled data.

  • Iterative and interactive development 📊: Users can easily analyze temporal data and visualize results in real-time with iterative tools like notebooks. When prototyping, users can iteratively preprocess, analyze, and visualize temporal data in real-time with notebooks. In production, users can easily reuse, apply, and scale these implementations to larger datasets.

  • Avoids future leakage 😰: Future leakage occurs during model training when a model is exposed to data from future events, which leaks information that would otherwise not be available to the model and can result in overfitting. Temporian operators do not create leakage by default. Users can also use Temporian to programmatically detect whether specific signals were exposed to future leakages.

  • Flexible runtime ☁️: Temporian programs can run seamlessly in-process in Python, on large datasets using Apache Beam.

  • Highly optimized 🔥: Temporian's core is implemented and optimized in C++, so large amounts of data can be handled in-process. In some cases, Temporian is 1000x faster than other libraries.

QuickStart

Installation

Temporian is available on PyPI. Install it with pip:

pip install temporian

Minimal example

The following example uses a dataset, sales.csv, which contains transactional data. Here is a preview of the data:

$ head sales.csv
timestamp,store,price,count
2022-01-01,CA,27.42,61.9
2022-01-01,TX,98.55,18.02
2022-01-02,CA,32.74,14.93
2022-01-15,TX,48.69,83.99
...

The following code calculates the weekly sales for each store, visualizes the output with a plot, and exports the data to a CSV file.

import temporian as tp

input_data = tp.from_csv("sales.csv")

per_store = input_data.set_index("store")
weekly_sum = per_store["price"].moving_sum(window_length=tp.duration.days(7))

# Plot the result
weekly_sum.plot()

# Save the results
tp.to_csv(weekly_sum, "store_sales_moving_sum.csv")

Check the Getting Started tutorial to try it out!

Next steps

New users should refer to the 3 minutes to Temporian page, which provides a quick overview of the key concepts and operations of Temporian.

After reading the 3 minute guide, 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.

Documentation

The documentation 📚 is available at temporian.readthedocs.io. The 3 minutes to Temporian ⏰️ 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.1.4.tar.gz (211.7 kB view details)

Uploaded Source

Built Distributions

temporian-0.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (586.8 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

temporian-0.1.4-cp311-cp311-macosx_13_0_arm64.whl (522.1 kB view details)

Uploaded CPython 3.11 macOS 13.0+ ARM64

temporian-0.1.4-cp311-cp311-macosx_12_0_x86_64.whl (543.2 kB view details)

Uploaded CPython 3.11 macOS 12.0+ x86-64

temporian-0.1.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (586.9 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

temporian-0.1.4-cp310-cp310-macosx_13_0_arm64.whl (520.9 kB view details)

Uploaded CPython 3.10 macOS 13.0+ ARM64

temporian-0.1.4-cp310-cp310-macosx_12_0_x86_64.whl (541.9 kB view details)

Uploaded CPython 3.10 macOS 12.0+ x86-64

temporian-0.1.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (587.6 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

temporian-0.1.4-cp39-cp39-macosx_13_0_arm64.whl (521.0 kB view details)

Uploaded CPython 3.9 macOS 13.0+ ARM64

temporian-0.1.4-cp39-cp39-macosx_12_0_x86_64.whl (542.0 kB view details)

Uploaded CPython 3.9 macOS 12.0+ x86-64

temporian-0.1.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (585.4 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

temporian-0.1.4-cp38-cp38-macosx_13_0_arm64.whl (520.7 kB view details)

Uploaded CPython 3.8 macOS 13.0+ ARM64

temporian-0.1.4-cp38-cp38-macosx_12_0_x86_64.whl (541.8 kB view details)

Uploaded CPython 3.8 macOS 12.0+ x86-64

File details

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

File metadata

  • Download URL: temporian-0.1.4.tar.gz
  • Upload date:
  • Size: 211.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.12 Linux/5.15.0-1041-azure

File hashes

Hashes for temporian-0.1.4.tar.gz
Algorithm Hash digest
SHA256 6b55af25cf10dc90be65a253cb3e5bb4886bf51f2873477fa061dd7c5c050473
MD5 9051d65fed0d6743206fdd0694ca7d5a
BLAKE2b-256 e939d798ddd9197b5426b52493f7727b47dd81a3def8378ac9d06fd907a6a0af

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b5e27137a59097d17b7696828b10b934c1816a7a34c3ac911bcccade1f965c50
MD5 c560c3c0fe1dc69dc818a2c25de4684d
BLAKE2b-256 a67a6b7d66025df3e795b576006a11654be8ea6bdc5d8c73eef6bdad8e2a1a49

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.4-cp311-cp311-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 119e02e076bcdaa9982ef3eaa828f270c7cbf42d5dda030e8c6299d41455f3c4
MD5 5d41804959b1f5210ea936b1184d7aa8
BLAKE2b-256 08bd00cb24363a8ae78947c5df4291bc5b0a6f8956ff1b6a98868e0081bcccc7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.4-cp311-cp311-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 eb227cc7e336148b17d389a89421110e939ba73e62368f749db085c301cc9af7
MD5 0d7e6cf2cbf912f5c215f25a4cbecccf
BLAKE2b-256 c5aecbd75ae7e918a57be568379f4616dd6c2a26231c3ca0081922c219c31dd3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 28061220bd60cbb8ef48d8cc5f0d98ec15843967d5fe02039bfb1508009afacb
MD5 28a01ca85cce73d6d4fa591b7f476db1
BLAKE2b-256 de7b29fca127a6ca09e216827ef7e789684cfef16e4e9041e3f57264457098b3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.4-cp310-cp310-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 1334a395160ec6fc90489bad4c37b8161ec70f563e60b85f63d683b9bc6e46dc
MD5 56edd9a2d5004d5c9deb3c0c75199311
BLAKE2b-256 bb241f212ffe4be5f19159f09b8f79f8191c853c17310310aa0660ea23e26118

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.4-cp310-cp310-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 004ea74fd4b6f7787eca11c40275768f201fc277cff2e8a871447bd628537831
MD5 793775af9d9ed83f51b06cfdc4165145
BLAKE2b-256 2923d06461707b6b9707e07be08981a0c11397bd8466da7c471f7e1dfbad4443

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bdee6ec890e0bd318f0b4d7fdf20fa52da3daac8bd1c1f2b8b5efa0f442f3cee
MD5 520096622d9cea2b86291bdf030a2fdb
BLAKE2b-256 1390cfde3357aa4880b6eebe354ba6f5e17833014ee749d732c04b373eade3f9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.4-cp39-cp39-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 52c9924505199967c7739bdb5519d1b1c4d3098ad845dd149893e1d4928aeb6b
MD5 6b349bd3486c5bbf5026e8c03537a3d7
BLAKE2b-256 7784fa0951547aca69e74bf5c3f8e3616c5796cdeb7c2c0ad1871c013d2ab5a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.4-cp39-cp39-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 40fb82f6e67f36df41cbb1688d3446b33a56148346e524f53d78cf0adc210ff6
MD5 b542e3d9930deb5347fcbb9029cc2cd7
BLAKE2b-256 d39c1984913930d58620ba46a1aea6a976781bcd2ab40de130c29c6621b6158b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a6289bd77f14a3dcc4b805dd951f9a408e8717658c95ecc07f73899b3338da69
MD5 e04ebd4f397f95c31e5028877bed4ea3
BLAKE2b-256 02696553f372bac414b8492357fec2edc54d201ef09fb73b67a7ef6f2e5eaece

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.4-cp38-cp38-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 4e8c71c663a8de2d9d2b3a02e28366a91816e83fb10ccc4947d65df0f1345105
MD5 d814c2643dac73ace8b876a3753d723c
BLAKE2b-256 e11607f049b6ad52b1c9cb23666c4499953dacd5339b3cbf4ba9b68018fdb2a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.4-cp38-cp38-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 5b2951d95c733d5cba4185941f119a3e61106f952f56e51e1733a67ba0f70159
MD5 d16149ba1b95038f896f3375b1ae321c
BLAKE2b-256 ae33ec913f974baba021ff4daa40ba8c022bdfe151b71438d43c101e7030769d

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