ユーザ用ツール

サイト用ツール


サイドバー



最近の更新



Tag Cloud

タグ#
6
10
1
3
1
2
17
7
1
1
6
12
4
1
2
201
1
6
2
7
14
5
1
27
3
3
1
6
1
1
41
1
3
3
1
1
1
1
1
1
23
46
7
9
10
5
10
3
3
2
8
2
2
6
5
1
1
4
9
4
3
3
2
1
8
2
4
1
5
27
2
12
2
3
1
1
2
2
1
1
1
4
3
2
4
2
2
1
1
2
1
2
1
2
1
26
2
1
2
2
2
1
1
2
3
13
5
8
1
1
2
12
1
4
1
2
7
1
1
1
1
1
8
1
5
2
1
1
1
3
3
10
1
2
1
1
7
3
1
10
1
1
4
1
2
1
2
7
2
1
3
1
1
3
1
2
1
2
2
2
1
2
3
1
2
3
4
1
3
1
3
3
2
1
1
7
1
3
3
1
1
1
1
5
1
32
2
1
2
1
2
2
3
1
1
1
3
1
2
1
1
1
3
1
1
1
2
4
2
1
1
1
3
1
2
4
2
1
2
1
1
1
1
2
1
1
15_python:01_prettytable

01 PrettyTable

$ pip3 search PrettyTable
PrettyTable (7)             - A simple Python library for easily displaying tabular data in a visually appealing ASCII table format.
from prettytable import PrettyTable

def outputTable():
    x = PrettyTable()
    x.field_names = {"a","b","c"}
    x.add_row({"1","2","3"})

    print(x.get_string())


if __name__ == '__main__':
    outputTable()

実行結果

+---+---+---+
| c | b | a |
+---+---+---+
| 1 | 3 | 2 |
+---+---+---+
15_python/01_prettytable.txt · 最終更新: 2019/03/26 22:09 by matsui

Yesterday:1447 Today:1660 Total:06132