tslumen.profile.summary module¶
Summary indicators, both at frame and series levels.
-
tslumen.profile.summary.
df_scaled
(data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame]) → Union[pandas.core.series.Series, pandas.core.frame.DataFrame][source]¶ Data scaled to be between 0 and 1.
- Parameters
data (Union[pd.Series, pd.DataFrame]) – Time series.
- Returns
Scaled data.
- Return type
Union[pd.Series, pd.DataFrame]
-
tslumen.profile.summary.
dt_end
(data: pandas.core.frame.DataFrame) → Any[source]¶ - Parameters
data (pd.DataFrame) – Time series.
- Returns
End datetime.
- Return type
datetime
-
tslumen.profile.summary.
dt_start
(data: pandas.core.frame.DataFrame) → Any[source]¶ - Parameters
data (pd.DataFrame) – Time series.
- Returns
Start datetime.
- Return type
datetime
-
tslumen.profile.summary.
freq
(data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame]) → Optional[str][source]¶ - Parameters
data (Union[pd.Series, pd.DataFrame]) – Time series.
- Returns
Data’s inferred frequency.
- Return type
int
-
tslumen.profile.summary.
infinite
(data: pandas.core.series.Series) → int[source]¶ Count number of infinite values.
- Parameters
data (pd.Series) – Time series.
- Returns
Number of
np.inf
indata
.- Return type
int
-
tslumen.profile.summary.
length
(data: pandas.core.frame.DataFrame) → int[source]¶ - Parameters
data (pd.DataFrame) – Time series.
- Returns
Length of the time series.
- Return type
int
-
tslumen.profile.summary.
missing
(data: pandas.core.series.Series) → Any[source]¶ Count number of missing values.
- Parameters
data (pd.Series) – Time series.
- Returns
Number of
np.nan
indata
.- Return type
int
-
tslumen.profile.summary.
n_series
(data: pandas.core.frame.DataFrame) → int[source]¶ - Parameters
data (pd.DataFrame) – Time series.
- Returns
Number of series in the DataFrame.
- Return type
int
-
tslumen.profile.summary.
period
(data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame]) → Optional[int][source]¶ - Parameters
data (Union[pd.Series, pd.DataFrame]) – Time series.
- Returns
Data’s periodicity.
- Return type
int
-
tslumen.profile.summary.
sample
(data: pandas.core.series.Series, sample_size: int = 10) → pandas.core.series.Series[source]¶ Sample N records from the data.
- Parameters
data (pd.Series) – Time series.
sample_size (int) – Size of the sample.
- Returns
First and last
sample_size/2
records indata
.- Return type
pd.Series