From 6dbbab0acdda3cd544d764507824d442b9da9230 Mon Sep 17 00:00:00 2001 From: Valeriy Mukhtarulin Date: Fri, 6 Dec 2019 12:20:19 -0300 Subject: [PATCH 1/3] Fix typing bug --- src/arche/readers/items.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arche/readers/items.py b/src/arche/readers/items.py index 93453a9..beda633 100755 --- a/src/arche/readers/items.py +++ b/src/arche/readers/items.py @@ -29,8 +29,8 @@ def process_df(df: pd.DataFrame) -> pd.DataFrame: return df @staticmethod - def categorize(df: pd.DataFrame) -> pd.DataFrame: - """Cast columns with repeating values to `category` type to save memory""" + def categorize(df: pd.DataFrame) -> None: + """Cast columns with repeating values to `category` type inplace to save memory""" if len(df) < 100: return for c in tqdm(df.columns, desc="Categorizing"): From 9f25af88eda9ac0b367ff0fc08e43fa982ea3f03 Mon Sep 17 00:00:00 2001 From: Valeriy Mukhtarulin Date: Sat, 7 Dec 2019 10:26:58 -0300 Subject: [PATCH 2/3] Update items.py --- src/arche/readers/items.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/arche/readers/items.py b/src/arche/readers/items.py index beda633..edf20f1 100755 --- a/src/arche/readers/items.py +++ b/src/arche/readers/items.py @@ -30,7 +30,8 @@ def process_df(df: pd.DataFrame) -> pd.DataFrame: @staticmethod def categorize(df: pd.DataFrame) -> None: - """Cast columns with repeating values to `category` type inplace to save memory""" + """Cast columns with repeating values to `category` type inplace + to save memory""" if len(df) < 100: return for c in tqdm(df.columns, desc="Categorizing"): From c856b3041301017448f0c7251982e7ace84242b8 Mon Sep 17 00:00:00 2001 From: Valeriy Mukhtarulin Date: Mon, 9 Dec 2019 15:01:17 -0300 Subject: [PATCH 3/3] Update items.py --- src/arche/readers/items.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arche/readers/items.py b/src/arche/readers/items.py index edf20f1..dfbc697 100755 --- a/src/arche/readers/items.py +++ b/src/arche/readers/items.py @@ -30,7 +30,7 @@ def process_df(df: pd.DataFrame) -> pd.DataFrame: @staticmethod def categorize(df: pd.DataFrame) -> None: - """Cast columns with repeating values to `category` type inplace + """Cast columns with repeating values to `category` type in-place to save memory""" if len(df) < 100: return