Skip to content

convert_objects incorrectly converting bools to nans #7126

Closed
@cpcloud

Description

@cpcloud

SO xref: http://stackoverflow.com/q/23658092/564538

In [45]: paste
>>> s1 = Series([1, True, 3, 5], index=['a', 'b', 'c', 'e'])

## -- End pasted text --

In [46]: s1
Out[46]:
a       1
b    True
c       3
e       5
dtype: object

In [47]: s1.convert_objects(convert_numeric=True)
Out[47]:
a     1
b   NaN
c     3
e     5
dtype: float64

Metadata

Metadata

Assignees

Labels

BugDtype ConversionsUnexpected or buggy dtype conversionsNumeric OperationsArithmetic, Comparison, and Logical operations

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions