Skip to content

Commit de823fb

Browse files
committed
BUG: closes issue #7212 - read_hdf modifying passed columns list
parameter when multi-indexed
1 parent b7c3271 commit de823fb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pandas/io/pytables.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -4022,7 +4022,11 @@ def read(self, where=None, columns=None, **kwargs):
40224022
df = concat(frames, axis=1, verify_integrity=False).consolidate()
40234023

40244024
# apply the selection filters & axis orderings
4025-
df = self.process_axes(df, columns=columns)
4025+
if type(columns) is list:
4026+
columns_new = list(columns)
4027+
else:
4028+
columns_new = columns
4029+
df = self.process_axes(df, columns=columns_new)
40264030

40274031
return df
40284032

0 commit comments

Comments
 (0)