ENH: allow complex type inference in astype/convert_objects (original) (raw)

Skip to content

Sign in

Appearance settings

View all features

View all solutions

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Sign in

Sign up

Appearance settings

pandas-dev / pandas Public

Additional navigation options

New issue

New issue

Closed

#52855

Closed

ENH: allow complex type inference in astype/convert_objects

#4895

#52855

Assignees

srkds

Labels

ComplexComplex NumbersDtype ConversionsUnexpected or buggy dtype conversionsEnhancementNeeds TestsUnit test(s) needed to prevent regressions

@jreback

Description

@jreback

jreback

opened

on Sep 20, 2013

astype/convert_objects should be able to do this type of coercion from string complex looking

In [45]: Series(['1.0+5j','1.5-3j']).apply(lambda x: np.complex(x))
Out[45]: 
0      (1+5j)
1    (1.5-3j)
dtype: complex128

http://stackoverflow.com/questions/18919699/python-pandas-complex-number/18919965#18919965

Metadata

Metadata

Assignees

Labels

ComplexComplex NumbersDtype ConversionsUnexpected or buggy dtype conversionsEnhancementNeeds TestsUnit test(s) needed to prevent regressions

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions