Add test suite forNumCharactersand modify docstring#2463
Conversation
3bddcb1 to
bdd58c3
Compare
0a8ab33 to
e30b4c1
Compare
| # Convert boolean column to be float64 | ||
| if pd.api.types.is_bool_dtype(more_complex_col): | ||
| # Convert boolean or Int64 column to be float64 | ||
| if pd.api.types.is_bool_dtype(more_complex_col) or isinstance( |
There was a problem hiding this comment.
Changing NumCharacters to return IntegerNullable triggered an error here. Int64 doesn't seem to support the corr operation. There is a _is_integer_dtype function, but that would cast a wider net and grab series with the int64 dtype. This way is a little more selective and does the conversion less often.
Codecov Report
@@ Coverage Diff @@
## main #2463 +/- ##
=======================================
Coverage 99.42% 99.42%
=======================================
Files 354 355 +1
Lines 21385 21421 +36
=======================================
+ Hits 21261 21297 +36
Misses 124 124
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
thehomebrewnerd
left a comment
There was a problem hiding this comment.
This looks good to me. My only minor nitpick is that is unrelated to this change, is that perhaps we should update the primitive docstring to make it more clear that this primitive counts all characters, including whitespace and punctuation, but that's not a big deal.
NumCharactersNumCharactersdocstring and test suite
NumCharactersdocstring and test suiteNumCharactersdocstring and add test suite
NumCharactersdocstring and add test suiteNumCharactersand modify docstring
NumCharactersdoes not have test suite #2462NumCharactersto return null given null input