Skip to content

Create pd.Series initializer overload to propagate the generic type of an input container #710

Closed
@gandhis1

Description

@gandhis1

How can the type of iter(something) be different from something.__iter__ ? Is there some double check I should do ?

I think the issue is that when you are doing s.groupby(series_groupby), s is Series[Any] because there was no dtype information supplied. If you had created s=pd.Series([1, 1, 2], dtype=int), then you'd get the results you expect.

Maybe this is deserving of a separate issue, but shouldn't we be able to create an initializer overload that takes a list[T] and returns a pd.Series[T]?

Originally posted by @gandhis1 in #708 (comment)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions