From a37fa622d077bedf61e0698b990a86feb0e49641 Mon Sep 17 00:00:00 2001 From: engisalor <50170623+engisalor@users.noreply.github.com> Date: Tue, 6 Dec 2022 14:41:28 +0100 Subject: [PATCH] fix(util): nan_to_none return a series of [None] --- corpusama/util/convert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/corpusama/util/convert.py b/corpusama/util/convert.py index a6f317f..df2a7c3 100644 --- a/corpusama/util/convert.py +++ b/corpusama/util/convert.py @@ -66,7 +66,7 @@ def nan_to_none( if series.any(): series = series.replace(to_replace=bad_NAs, value=None, regex=True) else: - series = [None for x in series] + series = pd.Series([None for x in series], dtype=object) return series