Skip to content

Commit 527d6f9

Browse files
fix column names problems for univariate time series
1 parent 5dbae2a commit 527d6f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ahead/utils/univariate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from rpy2.robjects.vectors import StrVector
1111
from .unimultivariate import get_frequency
1212

13+
base = importr("base")
1314
stats = importr("stats")
1415

1516

@@ -20,10 +21,9 @@ def compute_y_ts(df, df_frequency):
2021
ts = stats.ts(
2122
FloatVector(input_series.flatten()),
2223
frequency=get_frequency(df_frequency),
24+
names = StrVector(df.columns.tolist())
2325
)
2426

25-
ts.colnames = StrVector(df.columns.tolist())
26-
2727
return ts
2828

2929

0 commit comments

Comments
 (0)