This class represents a univariate time series. It allows for the storage of time indexed values as well as metadata. The constructor guarantees the monotonic increasing character of a time series.
Warning
The aim of a TimeSeries object is to be immutable
TimeSeries(series, …)
TimeSeries
A TimeSeries object is a series of time indexed values.
create(start, end[, freq, metadata])
create
Creates an empty TimeSeries object with the period as index
plot(*args, **kwargs)
plot
Plot a TimeSeries
copy([deep])
copy
Copy a TimeSeries
split_at(timestamp)
split_at
Split a TimeSeries at a defined point and include the splitting point in both as in [start,…,at] and [at,…,end].
split_in_chunks(n)
split_in_chunks
Split a TimeSeries into chunks of length n
fill(value)
fill
Fill a TimeSeries with values
empty()
empty
Empty the TimeSeries (fill all values with NaNs)
pad(limit[, side, value])
pad
Pad a TimeSeries until a given limit
trim([side])
trim
Remove NaNs from a TimeSeries start, end or both
merge(ts)
merge
Merge two time series and make sure all the given indexes are sorted.
apply(func[, ts])
apply
Wrapper around the Pandas apply function
resample(freq[, method])
resample
Convert TimeSeries to specified frequency.
group_by(freq[, method])
group_by
Groups values by a frequency.
interpolate(*args, **kwargs)
interpolate
Wrapper around the Pandas interpolate() method.
normalize(method)
normalize
Normalize a TimeSeries with a given method
round(decimals)
round
Round the values in the series.values
sort(*args, **kwargs)
sort
Sort a TimeSeries by time stamps
min()
min
Get the minimum value of a TimeSeries
max()
max
Get the maximum value of a TimeSeries
mean()
mean
Get the mean value of a TimeSeries
median()
median
Get the median value of a TimeSeries
skewness()
skewness
Get the skewness of a TimeSeries
kurtosis()
kurtosis
Get the kurtosis of a TimeSeries
describe([percentiles, include, exclude])
describe
Describe a TimeSeries with the describe function from Pandas
start()
start
Get the first Timestamp of a TimeSeries
end()
end
Get the last Timestamp of a TimeSeries
boundaries()
boundaries
Get a tuple with the TimeSeries first and last index
frequency()
frequency
Get the frequency of a TimeSeries
duration()
duration
Get the duration of the TimeSeries
to_text(path)
to_text
Export a TimeSeries to text format
to_array()
to_array
Convert a TimeSeries to Numpy Array
to_pickle(path)
to_pickle
Export a TimeSeries to Pickle
to_darts()
to_darts
Convert a TimeSeries to Darts TimeSeries
to_df()
to_df
Converts a TimeSeries to a Pandas DataFrame