From 73c7ed486018d1e1b2def7e8cb8ec68b26ae9c06 Mon Sep 17 00:00:00 2001 From: Hi-king Date: Sun, 24 May 2020 17:50:11 +0900 Subject: [PATCH] :art: rename _flatten_recursively --- gokart/task.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gokart/task.py b/gokart/task.py index 892aea61..b4e7724e 100644 --- a/gokart/task.py +++ b/gokart/task.py @@ -191,12 +191,12 @@ def load_data_frame(self, target: Union[None, str, TargetOnKart] = None, required_columns: Optional[Set[str]] = None, drop_columns: bool = False) -> pd.DataFrame: - def _pd_concat(dfs): + def _flatten_recursively(dfs): if isinstance(dfs, list): - return pd.concat([_pd_concat(df) for df in dfs]) + return pd.concat([_flatten_recursively(df) for df in dfs]) else: return dfs - data = _pd_concat(self.load(target=target)) + data = _flatten_recursively(self.load(target=target)) required_columns = required_columns or set() if data.empty and len(data.index) == 0: