Skip to content

CLN: avoid values_from_object in construction #32504

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

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pandas/core/internals/construction.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

from pandas.core import algorithms, common as com
from pandas.core.arrays import Categorical
from pandas.core.construction import sanitize_array
from pandas.core.construction import extract_array, sanitize_array
from pandas.core.indexes import base as ibase
from pandas.core.indexes.api import (
Index,
Expand Down Expand Up @@ -519,7 +519,7 @@ def _list_of_series_to_arrays(data, columns, coerce_float=False, dtype=None):
else:
indexer = indexer_cache[id(index)] = index.get_indexer(columns)

values = com.values_from_object(s)
values = extract_array(s, extract_numpy=True)
aligned_values.append(algorithms.take_1d(values, indexer))

values = np.vstack(aligned_values)
Expand Down