API Reference#
This page gives an overview of all of Temporian's public symbols.
Check the index on the left for a more detailed description of any symbol.
Classes#
Symbol | Description |
---|---|
tp.EventSetNode |
Reference to the input or output of an operator in the compute graph. |
tp.EventSet |
Container for actual temporal data. |
tp.Schema |
Description of the data inside an EventSetNode or EventSet . |
tp.FeatureSchema |
Description of a feature inside a Schema . |
tp.IndexSchema |
Description of an index inside a Schema . |
Functions#
Symbol | Description |
---|---|
tp.run() |
Evaluates EventSetNodes on EventSets . |
tp.plot() |
Plots EventSets . |
tp.event_set() |
Creates an EventSet from arrays (lists, NumPy arrays, Pandas Series.) |
tp.input_node() |
Creates an input EventSetNode , that can be used to feed data into a graph. |
Input/output#
Symbol | Description |
---|---|
tp.from_pandas() |
Converts a Pandas DataFrame into an EventSet . |
tp.to_pandas() |
Converts an EventSet to a pandas DataFrame. |
tp.from_csv() |
Reads an EventSet from a CSV file. |
tp.to_csv() |
Saves an EventSet to a CSV file. |
Durations#
Symbols | Description |
---|---|
tp.duration.milliseconds() tp.duration.seconds() tp.duration.minutes() tp.duration.hours() tp.duration.days() tp.duration.weeks() |
Convert input value from milliseconds / seconds / minutes / hours / days / weeks to a Duration in seconds. |
Operators#
Symbols | Description |
---|---|
tp.combine() |
Combines events from EventSets with different samplings. |
tp.glue() |
Concatenates features from EventSets with the same sampling. |
EventSet.abs() |
Computes the absolute value of the features. |
EventSet.add_index() |
Adds indexes to an EventSet . |
EventSet.arccos() |
Computes the inverse cosine of the features. |
EventSet.arcsin() |
Computes the inverse sine of the features. |
EventSet.arctan() |
Computes the inverse tangent of the features. |
EventSet.begin() |
Generates a single timestamp at the beginning of the input. |
EventSet.cast() |
Casts the dtype of features. |
EventSet.cos() |
Computes the cosine of the features. |
EventSet.drop_index() |
Removes indexes from an EventSet . |
EventSet.end() |
Generates a single timestamp at the end of the input. |
EventSet.enumerate() |
Creates an ordinal feature enumerating the events according to their timestamp. |
EventSet.equal() |
Creates boolean features with event-wise equality to another EventSet or to a scalar value. |
EventSet.experimental_fast_fourier_transform() |
Applies a Fast Fourier Transform. |
EventSet.filter() |
Filters out events in an EventSet for which a condition is false. |
EventSet.filter_empty_index() |
Filters out indexes without events. |
EventSet.filter_moving_count() |
Skips events such that no more than one event is within a time window of window_length . |
EventSet.isnan() |
Event-wise boolean that is True in the NaN positions of the input events. Equivalent to ~evset.notnan() . |
EventSet.join() |
Joins EventSets with different samplings but the same index together. |
EventSet.lag() |
Adds a delay to an EventSet 's timestamps. |
EventSet.leak() |
Subtracts a duration from an EventSet 's timestamps. |
EventSet.log() |
Computes natural logarithm of the features |
EventSet.map() |
Applies a function on each of an EventSet 's values. |
EventSet.notnan() |
Event-wise boolean that is True if the input values are not NaN . Equivalent to ~evset.isnan() . |
EventSet.prefix() |
Adds a prefix to the names of the features in an EventSet . |
EventSet.propagate() |
Propagates feature values over a sub index. |
EventSet.rename() |
Renames an EventSet 's features and index. |
EventSet.resample() |
Resamples an EventSet at each timestamp of another EventSet . |
EventSet.select() |
Selects a subset of features from an EventSet . |
EventSet.select_index_values() |
Selects a subset of index values from an EventSet . |
EventSet.set_index() |
Replaces the indexes in an EventSet . |
EventSet.sin() |
Computes the sine of the features. |
EventSet.since_last() |
Computes the amount of time since the last distinct timestamp. |
EventSet.tan() |
Computes the tangent of the features. |
EventSet.tick() |
Generates timestamps at regular intervals in the range of a guide. |
EventSet.tick_calendar() |
Generates timestamps at the specified calendar date-time events. |
EventSet.timestamps() |
Creates a feature from the events timestamps (float64 ). |
EventSet.unique_timestamps() |
Removes events with duplicated timestamps from an EventSet . |
EventSet.until_next() |
Duration until the next sampling event. |
EventSet.where() |
Choose events from two possible sources, based on boolean conditions. |
Calendar operators#
Symbols | Description |
---|---|
EventSet.calendar_day_of_month() EventSet.calendar_day_of_week() EventSet.calendar_day_of_year() EventSet.calendar_hour() EventSet.calendar_iso_week() EventSet.calendar_minute() EventSet.calendar_month() EventSet.calendar_second() EventSet.calendar_year() |
Obtain the day of month / day of week / day of year / hour / ISO week / minute / month / second / year the timestamps in an EventSet are in. |
Window operators#
Symbols | Description |
---|---|
EventSet.simple_moving_average() EventSet.moving_standard_deviation() EventSet.cumsum() EventSet.moving_sum() EventSet.moving_count() EventSet.moving_min() EventSet.moving_max() EventSet.cumprod() EventSet.moving_product() |
Compute an operation on the values in a sliding window over an EventSet's timestamps. |
Python operators#
Symbols | Description |
---|---|
+ (add), - (subtract), \* (multiply), / (divide), // (floor divide), % (modulo), ** (power) |
Event-wise arithmetic operations between two EventSets or with a scalar number. See the corresponding User Guide section for more info. |
!= (not equal), > (greater than), >= (greater or equal), < (less), <= (less or equal) |
Event-wise comparison between EventSets or to a scalar number. Note that == is not supported, use EventSet.equal() instead. See the User Guide for more info. |
& (and), \| (or), ^ (xor) |
Event-wise logic operators between boolean EventSets . |