Skip to content

Bugfix for constructing empty Series, with index, using ExtensionDtyp… #44615

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

Closed
wants to merge 12 commits into from
2 changes: 2 additions & 0 deletions pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,8 @@ def _init_dict(
# fastpath for Series(data=None). Just use broadcasting a scalar
# instead of reindexing.
values = na_value_for_dtype(pandas_dtype(dtype), compat=False)
if values is None:
values = [None] * len(index)
keys = index
else:
keys, values = (), []
Expand Down