8000 DEPR: deprecate default of skipna=False in infer_dtype by h-vetinari · Pull Request #24050 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

DEPR: deprecate default of skipna=False in infer_dtype #24050

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Jan 4, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Try skipna=True for new call-sites
  • Loading branch information
h-vetinari committed Jan 3, 2019
commit 1ea21fef39c46ecdc628e1be0a6150f05d1c9693
2 changes: 1 addition & 1 deletion pandas/core/arrays/array_.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def array(data, # type: Sequence[object]
return cls._from_sequence(data, dtype=dtype, copy=copy)

if dtype is None:
inferred_dtype = lib.infer_dtype(data, skipna=False)
inferred_dtype = lib.infer_dtype(data, skipna=True)
if inferred_dtype == 'period':
try:
return period_array(data, copy=copy)
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/reshape/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -962,8 +962,8 @@ def _maybe_coerce_merge_keys(self):
# object values are allowed to be merged
elif ((lk_is_object and is_numeric_dtype(rk)) or
(is_numeric_dtype(lk) and rk_is_object)):
inferred_left = lib.infer_dtype(lk, skipna=False)
inferred_right = lib.infer_dtype(rk, skipna=False)
inferred_left = lib.infer_dtype(lk, skipna=True)
inferred_right = lib.infer_dtype(rk, skipna=True)
bool_types = ['integer', 'mixed-integer', 'boolean', 'empty']
string_types = ['string', 'unicode', 'mixed', 'bytes', 'empty']

Expand Down
0