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 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.

Note Temporian's development is in alpha.

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

Uploaded Source

Built Distributions

temporian-0.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (637.5 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

temporian-0.1.5-cp311-cp311-macosx_13_0_arm64.whl (571.8 kB view details)

Uploaded CPython 3.11 macOS 13.0+ ARM64

temporian-0.1.5-cp311-cp311-macosx_12_0_x86_64.whl (593.5 kB view details)

Uploaded CPython 3.11 macOS 12.0+ x86-64

temporian-0.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (637.8 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

temporian-0.1.5-cp310-cp310-macosx_13_0_arm64.whl (570.9 kB view details)

Uploaded CPython 3.10 macOS 13.0+ ARM64

temporian-0.1.5-cp310-cp310-macosx_12_0_x86_64.whl (592.2 kB view details)

Uploaded CPython 3.10 macOS 12.0+ x86-64

temporian-0.1.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (638.9 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

temporian-0.1.5-cp39-cp39-macosx_13_0_arm64.whl (571.0 kB view details)

Uploaded CPython 3.9 macOS 13.0+ ARM64

temporian-0.1.5-cp39-cp39-macosx_12_0_x86_64.whl (592.4 kB view details)

Uploaded CPython 3.9 macOS 12.0+ x86-64

temporian-0.1.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (636.4 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

temporian-0.1.5-cp38-cp38-macosx_13_0_arm64.whl (570.8 kB view details)

Uploaded CPython 3.8 macOS 13.0+ ARM64

temporian-0.1.5-cp38-cp38-macosx_12_0_x86_64.whl (592.1 kB view details)

Uploaded CPython 3.8 macOS 12.0+ x86-64

File details

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

File metadata

  • Download URL: temporian-0.1.5.tar.gz
  • Upload date:
  • Size: 231.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.12 Linux/6.2.0-1012-azure

File hashes

Hashes for temporian-0.1.5.tar.gz
Algorithm Hash digest
SHA256 abad30018fadf64dae9f97db157355b0fe8e5d53320ad5e2955fea6143f01979
MD5 8180eb7e2bf7fd524d224ae78e3c4e63
BLAKE2b-256 0e23441fae23efe7099e4c777624f0e28e4991af3eaa6a1317bb206b76adfc52

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0bc3e5027b27c885209ad8fc18a028c77262720aa1363bd39ca2d1f2bdfe207c
MD5 51278e9016c6cf9fa71feb6dedf98d81
BLAKE2b-256 bbca5dc42530d22afb2fb93a5712a6f7d9d1cb35cf83e93d2b0bf5281dfa52eb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.5-cp311-cp311-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 5d3d8bcfe7b7fadcb986fd830c9b239b772f11ab171a86530af9db28634781b0
MD5 2b1e0341e6e081a63a4b011ae98e9512
BLAKE2b-256 8e41e2b3d570aa41f966cc3e909ce262fbed5d9c866aa032cd4634110e176f51

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.5-cp311-cp311-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 f568030d6ffba183f5d8725a0e8660d1c203ad0ea33a40e782e3d371983c8b99
MD5 d914e11467776711bd2e9b5b58c842ff
BLAKE2b-256 30aad19b830ffbbcf3bafd4c9f93d532ff8bec69952af13b3eab42ff4abecf36

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f8e086a2c61d00094e1032b0bae2481eab76aaa17f2a9fd901bd51ba3df4ef62
MD5 cbd39dd5c470f72aa17f462901254f01
BLAKE2b-256 4e694da924b828e288d1aff3adfb3d463d361e018a5cca9f6ba027804e18f3d6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.5-cp310-cp310-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 7f2ae905da9af5a79d0a7a7d3a41e7319365b3dc4c2138fc182cd6e173bb95bb
MD5 5f220ddcde02c059f5f255a237f4db31
BLAKE2b-256 07dc4578158906cb2344e96dec9d8baf696b4b5ff72db9b10e6d4c386870d574

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.5-cp310-cp310-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 e5c87f7a9f900c446809aa2a9eb1281489992b35c851cb121ff5f7e1a911e4dc
MD5 7207c258179aa89ee2680fc1cddc90f2
BLAKE2b-256 a21f0656e207fd17536c8eb0d64efa1097b01c6735c562af570e18a75783c75c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6d4cae6a0abea4c9afbb5b396c4d6a0c6f967b89976c215555e0f1fbe9a7ca55
MD5 866d0af2d253e9c174a5c15e068dbfbc
BLAKE2b-256 c4f77f550029750cad311957e618fdf544de9a5f8567e7c4660d6ec8f85e3ef0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.5-cp39-cp39-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 f546eb587b19c8ff574734991298b4a2e58528c1025eab2ee1e9bb7dfdfc9d10
MD5 e854b646461deb66f22065aa58f7d331
BLAKE2b-256 fd82175e3da6ca461e03e06b523ccdedcb06895fa8f1246708bbc28868dc4a7f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.5-cp39-cp39-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 6b27a7bcda1ad485a7a47a2add8e53c53fd9fc04526f95b3f650c251ccea3b78
MD5 fcd2fb41a25ebcb6c45d9a4b911c14b1
BLAKE2b-256 76ffddc1ac8c4787e3c0af7bcb220ccc5991a4fe9ffe15655f762ed188f3b222

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a7c8f3b6c03a11405113f3418482584d52d2edb4211b85c2121c42098678b0d7
MD5 3771550e6ec328a6311d01dcdac947b6
BLAKE2b-256 423edd57253e3315e78db972312d6e935a4d187879becded8ca2e00a557a2b29

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.5-cp38-cp38-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 0103e2fe89051dbb2166a2ffc8f62dd9fd85596778b4c63bc35290cf3e1ce087
MD5 7635f034a32775be4983076539393a90
BLAKE2b-256 446dce508c866f28b3f4b38fb817aa43b8f4ad7662d51dadf0a7680da9fb996f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.5-cp38-cp38-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 9bb3bb176a6d24558df8a42673929bde7e760ec6f686044cef39d9c2180e144b
MD5 390109d680a0ec77f6a4557b0ff0e264
BLAKE2b-256 b37c1d9859d318e16ea5d56f44103b3ce83a280d66bfabbf34bf1b82aee44faa

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