Skip to content

Commit

Permalink
Merge pull request #68 from fact-project/copy_columns
Browse files Browse the repository at this point in the history
Copy columns
  • Loading branch information
maxnoe authored May 29, 2017
2 parents 486a9ed + 916430e commit 58e9bdb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fact/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ def read_h5py(file_path, key='data', columns=None, mode='r+'):
# get all columns of which don't have more than one value per row
if columns is None:
columns = [col for col in group.keys() if group[col].ndim == 1]
else:
columns = copy(columns)

df = pd.DataFrame()
for col in columns:
Expand Down Expand Up @@ -133,6 +135,8 @@ def read_h5py_chunked(file_path, key='data', columns=None, chunksize=None, mode=
# get all columns of which don't have more than one value per row
if columns is None:
columns = [col for col in group.keys() if group[col].ndim == 1]
else:
columns = copy(columns)

n_rows = h5py_get_n_rows(file_path, key=key)

Expand Down

0 comments on commit 58e9bdb

Please sign in to comment.