mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +00:00
fix: Bump prophet, re-enable tests, and remedy column eligibility logic (#24129)
(cherry picked from commit 383dac6a5e)
This commit is contained in:
committed by
Michael S. Molina
parent
a5f3cfc726
commit
af2689d501
@@ -17,6 +17,7 @@
|
||||
import logging
|
||||
from typing import Optional, Union
|
||||
|
||||
import pandas as pd
|
||||
from flask_babel import gettext as _
|
||||
from pandas import DataFrame
|
||||
|
||||
@@ -134,7 +135,13 @@ def prophet( # pylint: disable=too-many-arguments
|
||||
raise InvalidPostProcessingError(_("DataFrame include at least one series"))
|
||||
|
||||
target_df = DataFrame()
|
||||
for column in [column for column in df.columns if column != index]:
|
||||
|
||||
for column in [
|
||||
column
|
||||
for column in df.columns
|
||||
if column != index
|
||||
and pd.to_numeric(df[column], errors="coerce").notnull().all()
|
||||
]:
|
||||
fit_df = _prophet_fit_and_predict(
|
||||
df=df[[index, column]].rename(columns={index: "ds", column: "y"}),
|
||||
confidence_interval=confidence_interval,
|
||||
|
||||
Reference in New Issue
Block a user