MCPcopy Create free account
hub / github.com/tensorflow/tensorboard / make_table_row

Function make_table_row

tensorboard/plugins/text/text_plugin.py:48–66  ·  view source on GitHub ↗

Given an iterable of string contents, make a table row. Args: contents: An iterable yielding strings. tag: The tag to place contents in. Defaults to 'td', you might want 'th'. Returns: A string containing the content strings, organized into a table row. Example: make

(contents, tag="td")

Source from the content-addressed store, hash-verified

46
47
48def make_table_row(contents, tag="td"):
49 """Given an iterable of string contents, make a table row.
50
51 Args:
52 contents: An iterable yielding strings.
53 tag: The tag to place contents in. Defaults to 'td', you might want 'th'.
54
55 Returns:
56 A string containing the content strings, organized into a table row.
57
58 Example: make_table_row(['one', 'two', 'three']) == '''
59 <tr>
60 <td>one</td>
61 <td>two</td>
62 <td>three</td>
63 </tr>''&#x27;
64 """
65 columns = ("<%s>%s</%s>\n" % (tag, s, tag) for s in contents)
66 return "<tr>\n" + "".join(columns) + "</tr>\n"
67
68
69def make_table(contents, headers=None):

Callers 1

make_tableFunction · 0.85

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…