Skip to content

Commit a2316f3

Browse files
authored
PERF: faster dataframe construction from recarray (pandas-dev#44827)
1 parent a3702e2 commit a2316f3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

doc/source/whatsnew/v1.4.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ Performance improvements
547547
- Performance improvement in :meth:`.GroupBy.sample`, especially when ``weights`` argument provided (:issue:`34483`)
548548
- Performance improvement when converting non-string arrays to string arrays (:issue:`34483`)
549549
- Performance improvement in :meth:`.GroupBy.transform` for user-defined functions (:issue:`41598`)
550-
- Performance improvement in constructing :class:`DataFrame` objects (:issue:`42631`, :issue:`43142`, :issue:`43147`, :issue:`43307`, :issue:`43144`)
550+
- Performance improvement in constructing :class:`DataFrame` objects (:issue:`42631`, :issue:`43142`, :issue:`43147`, :issue:`43307`, :issue:`43144`, :issue:`44826`)
551551
- Performance improvement in :meth:`GroupBy.shift` when ``fill_value`` argument is provided (:issue:`26615`)
552552
- Performance improvement in :meth:`DataFrame.corr` for ``method=pearson`` on data without missing values (:issue:`40956`)
553553
- Performance improvement in some :meth:`GroupBy.apply` operations (:issue:`42992`, :issue:`43578`)

pandas/core/internals/construction.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def rec_array_to_mgr(
176176
# essentially process a record array then fill it
177177
fdata = ma.getdata(data)
178178
if index is None:
179-
index = _get_names_from_index(fdata)
179+
index = default_index(len(fdata))
180180
else:
181181
index = ensure_index(index)
182182

0 commit comments

Comments
 (0)