timeatlas.time_series.
TimeSeries
A TimeSeries object is a series of time indexed values.
__init__
Defines a time series
series – Series or DataFrame containing the values and labels
metadata – Metadata-object
class_label – class label
Methods
__init__([series, metadata, class_label])
apply(func[, ts])
apply
Wrapper around the Pandas apply function
boundaries()
boundaries
Get a tuple with the TimeSeries first and last index
copy([deep])
copy
Copy a TimeSeries
create(start, end[, freq, metadata])
create
Creates an empty TimeSeries object with the period as index
describe([percentiles, include, exclude])
describe
Describe a TimeSeries with the describe function from Pandas
duration()
duration
Get the duration of the TimeSeries
empty()
empty
Empty the TimeSeries (fill all values with NaNs)
end()
end
Get the last Timestamp of a TimeSeries
fill(value)
fill
Fill a TimeSeries with values
frequency()
frequency
Get the frequency of a TimeSeries
group_by(freq[, method])
group_by
Groups values by a frequency.
interpolate(*args, **kwargs)
interpolate
Wrapper around the Pandas interpolate() method.
kurtosis()
kurtosis
Get the kurtosis 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
merge(ts)
merge
Merge two time series and make sure all the given indexes are sorted.
min()
min
Get the minimum value of a TimeSeries
normalize(method)
normalize
Normalize a TimeSeries with a given method
pad(limit[, side, value])
pad
Pad a TimeSeries until a given limit
plot(*args, **kwargs)
plot
Plot a TimeSeries
resample(freq[, method])
resample
Convert TimeSeries to specified frequency.
round(decimals)
round
Round the values in the series.values
skewness()
skewness
Get the skewness of a TimeSeries
sort(*args, **kwargs)
sort
Sort a TimeSeries by time stamps
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
start()
start
Get the first Timestamp of a TimeSeries
time_detlas()
time_detlas
Compute the time difference in seconds between each timestamp of a TimeSeries
to_array()
to_array
Convert a TimeSeries to Numpy Array
to_darts()
to_darts
Convert a TimeSeries to Darts TimeSeries
to_df()
to_df
Converts a TimeSeries to a Pandas DataFrame
to_pickle(path)
to_pickle
Export a TimeSeries to Pickle
to_text(path)
to_text
Export a TimeSeries to text format
trim([side])
trim
Remove NaNs from a TimeSeries start, end or both