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

Uploaded Source

Built Distributions

temporian-0.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (537.8 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

temporian-0.1.3-cp311-cp311-macosx_12_0_x86_64.whl (493.2 kB view details)

Uploaded CPython 3.11 macOS 12.0+ x86-64

temporian-0.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (537.9 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

temporian-0.1.3-cp310-cp310-macosx_12_0_x86_64.whl (491.8 kB view details)

Uploaded CPython 3.10 macOS 12.0+ x86-64

temporian-0.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (538.2 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

temporian-0.1.3-cp39-cp39-macosx_12_0_x86_64.whl (492.0 kB view details)

Uploaded CPython 3.9 macOS 12.0+ x86-64

temporian-0.1.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (537.0 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

temporian-0.1.3-cp38-cp38-macosx_12_0_x86_64.whl (491.8 kB view details)

Uploaded CPython 3.8 macOS 12.0+ x86-64

File details

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

File metadata

  • Download URL: temporian-0.1.3.tar.gz
  • Upload date:
  • Size: 194.5 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.3.tar.gz
Algorithm Hash digest
SHA256 5d28ee4f98bafddb9e5cc99d56e7fa6ba07ad311b960844a136f52f51d85bbb5
MD5 49ce48ee61ade460d373ef7ce4954026
BLAKE2b-256 549f6803a12cd95f5c2a60019bf54144db699c442abe15a05bed5782d2634b15

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 630005e17bae3c727f1f235169429b906cfdb88814775f3f2310f70d35cb5d0f
MD5 1d3d6983e1ba87b09ce2a888612ee2e2
BLAKE2b-256 9ed50fe44dd5b74baac54e2b41b5372579bc52e559e0dbbf21bfc2a07f019fe9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.3-cp311-cp311-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 749b2cd6b01d2702eccc9661d01e7139bb445b12b3280d3f7f5aa6b237906292
MD5 e9412d9b0fa394b6d9f4977478344df2
BLAKE2b-256 510acaebd985cafb599fd5cc6594ae0795b4a9bdc8f567fb9ba7038cb900d490

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 11bc30e1a9036cf800f434a6b260e20d9a48317f9597df70094bf1968416ed00
MD5 4db99158b8c08853405bc2170df7dad0
BLAKE2b-256 ad1853e5873ab3e1011c845273db2e6e1664963715b1bdef0cf149cae30c324e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.3-cp310-cp310-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 f3aa717fe2cdbdae512f496f3338733bef74851a1063402665ff8825abe82b83
MD5 b9d42bebc535b9009d938010c4f1c6fe
BLAKE2b-256 98374911e0b95630058ed21c1a136551baa0086a9dcf5800d8f962eb88da99f1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 098a9d1eaa234afb344e74528f09ff8004518823acef6c6a89628f484d9f239f
MD5 36517eb64bfdb45a8da491821e3f24a0
BLAKE2b-256 e732251d7dce150c516fa04dadc42c6a8a3043adad0a83f55be20fe7aeb03a35

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.3-cp39-cp39-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 646f2adb87d7e5141ee4453ce378a521385c956554298f826e3a829154e4ee4b
MD5 96c538b9b8dfd597665f4d66a65532d0
BLAKE2b-256 0041fab59a60eff8b28d539a87844a144ca46dc97573a3d7a9b211afc93f7a90

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ef87fa0cc93b4d22829f47c2efae3b84da0bde0025140a1783d7a55caf853774
MD5 bab92875112ad4feb094dbaf030e3c53
BLAKE2b-256 e3462cdd85fdfaa6650a8af3f8b6e29da299c9264ceab9e4a9800de343fd79b8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for temporian-0.1.3-cp38-cp38-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 65cce8f7687f4101791472378753041e9f4d553b73d1a035a9603d50701aaf58
MD5 d6a7da2c521aa920f1037d3473f5df28
BLAKE2b-256 ed80f4e4c11c8db6015c4ae4c7347409630cc0212d3386bf7ef3759683f5a39c

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