Skip to content

Commit

Permalink
rebuild and recheck
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnMount committed Apr 29, 2021
1 parent b9782de commit 39206ca
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
6 changes: 3 additions & 3 deletions coverage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ pkg/vtreat/stats_utils.py 101 4 96%
pkg/vtreat/transform.py 17 4 76%
pkg/vtreat/util.py 145 20 86%
pkg/vtreat/vtreat_api.py 285 56 80%
pkg/vtreat/vtreat_impl.py 639 89 86%
pkg/vtreat/vtreat_impl.py 642 89 86%
-----------------------------------------------
TOTAL 1243 184 85%
TOTAL 1246 184 85%


============================= 28 passed in 21.90s ==============================
============================= 28 passed in 21.88s ==============================
8 changes: 6 additions & 2 deletions pkg/build/lib/vtreat/vtreat_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,12 +639,16 @@ def pre_prep_frame(x, *, col_list, cols_to_copy, cat_cols=None):
if c in cset:
continue
bad_ind = vtreat.util.is_bad(x[c])
if ((cat_col_set is None) or (c not in cat_col_set)) and vtreat.util.can_convert_v_to_numeric(x[c]):
if cat_col_set is not None:
numeric_col = c not in cat_col_set
else:
numeric_col = vtreat.util.can_convert_v_to_numeric(x[c])
if numeric_col:
x[c] = vtreat.util.safe_to_numeric_array(x[c])
else:
# https://stackoverflow.com/questions/22231592/pandas-change-data-type-of-series-to-string
x[c] = x[c].astype(str)
x.loc[bad_ind, c] = numpy.nan
x.loc[bad_ind, c] = None
return x


Expand Down
Binary file modified pkg/dist/vtreat-0.4.9-py3-none-any.whl
Binary file not shown.
Binary file modified pkg/dist/vtreat-0.4.9.tar.gz
Binary file not shown.

0 comments on commit 39206ca

Please sign in to comment.