Skip to content

Commit

Permalink
Call DataFrame.map instead of DataFrame.applymap (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangkuiyi authored Jul 16, 2024
1 parent a01086a commit 212e595
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytorch_memlab/line_profiler/line_records.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def __repr__(self):
for qual_name, merged in self._merge_line_records_with_code().items():
maxlen = max(len(c) for c in merged.code)
left_align = '{{:{maxlen}s}}'.format(maxlen=maxlen)
merged[byte_cols] = merged[byte_cols].applymap(readable_size)
merged[byte_cols] = merged[byte_cols].map(readable_size)

# This is a mess, but I can't find any other way to left-align text strings.
code_header = (left_align.format('code'), '', '')
Expand Down

0 comments on commit 212e595

Please sign in to comment.