Skip to content

Commit

Permalink
Merge branch 'value_counts' into array_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
phofl committed Nov 26, 2023
2 parents 0c6bf14 + 8efb8f2 commit 9f0e0ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pandas/core/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ def value_counts_internal(

# For backwards compatibility, we let Index do its normal type
# inference, _except_ for if if infers from object to bool.
idx = Index(keys, dtype=input_dtype)
idx = Index(keys, dtype=input_dtype if input_dtype != "float16" else None)
if idx.dtype == bool and keys.dtype == object:
idx = idx.astype(object)
elif (
Expand Down

0 comments on commit 9f0e0ad

Please sign in to comment.