Skip to content

Commit 91df1f8

Browse files
authored
Merge pull request #506 from jgrewe/data_frame_print
fixes for DataFrame table_print function
2 parents 130fab2 + 703211a commit 91df1f8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

nixio/data_frame.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,9 @@ def print_table(self, row_sl=None, col_sl=None):
261261
row_form = "{:^10}" * (len(column) + 1)
262262
print(row_form.format("column:", *column))
263263
if self.units is not None:
264-
print(row_form.format(" unit:", *self.units[col_sl]))
264+
if None in self.units:
265+
units = [u if u is not None else "" for u in self.units[col_sl]]
266+
print(row_form.format(" unit:", *units))
265267
if not isinstance(row_sl, Iterable):
266268
ridx = list(range(len(self)))[row_sl]
267269
else:

nixio/hdf5/h5dataset.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ def _convert_string_cols(data):
7575

7676
def conv_row(row):
7777
for field in str_cols:
78-
print(field, row[field])
7978
row[field] = ensure_str(row[field])
8079
if str_cols:
8180
if not data.shape:

0 commit comments

Comments
 (0)