Skip to content

Commit 3d71e10

Browse files
spottvictor
authored and
victor
committed
Fixed HDFSTore.groups() performance. (pandas-dev#21543)
1 parent 17889d6 commit 3d71e10

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

doc/source/whatsnew/v0.23.2.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Fixed Regressions
1818

1919
- Fixed regression in :meth:`to_csv` when handling file-like object incorrectly (:issue:`21471`)
2020
- Bug in both :meth:`DataFrame.first_valid_index` and :meth:`Series.first_valid_index` raised for a row index having duplicate values (:issue:`21441`)
21-
-
21+
-
2222

2323
.. _whatsnew_0232.performance:
2424

@@ -28,6 +28,9 @@ Performance Improvements
2828
- Improved performance of membership checks in :class:`CategoricalIndex`
2929
(i.e. ``x in ci``-style checks are much faster). :meth:`CategoricalIndex.contains`
3030
is likewise much faster (:issue:`21369`, :issue:`21508`)
31+
- Improved performance of :meth:`HDFStore.groups` (and dependent functions like
32+
:meth:`~HDFStore.keys`. (i.e. ``x in store`` checks are much faster)
33+
(:issue:`21372`)
3134
- Improved performance of :meth:`MultiIndex.is_unique` (:issue:`21522`)
3235
-
3336

pandas/io/pytables.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,7 @@ def groups(self):
10981098
_tables()
10991099
self._check_if_open()
11001100
return [
1101-
g for g in self._handle.walk_nodes()
1101+
g for g in self._handle.walk_groups()
11021102
if (not isinstance(g, _table_mod.link.Link) and
11031103
(getattr(g._v_attrs, 'pandas_type', None) or
11041104
getattr(g, 'table', None) or

0 commit comments

Comments
 (0)