ユーザ用ツール

サイト用ツール


サイドバー



最近の更新



Tag Cloud

タグ数量
9
10
1
3
1
2
17
7
1
1
4
13
4
1
2
314
1
9
2
7
21
5
1
31
3
3
1
6
1
1
46
1
3
3
1
1
1
1
1
1
33
46
7
9
10
8
10
3
21
2
9
2
2
6
9
1
1
6
12
4
3
3
2
1
8
2
4
1
6
30
2
12
5
3
1
1
2
3
2
1
3
4
3
3
4
2
2
1
1
2
1
2
1
2
1
27
2
1
3
2
2
1
1
2
3
17
5
9
1
1
2
17
2
6
1
2
12
1
3
1
1
4
11
1
6
4
2
7
1
3
3
13
1
4
1
1
10
3
1
17
3
1
5
1
2
1
1
2
9
2
2
3
2
1
3
1
3
1
2
2
2
1
2
6
1
4
3
5
1
3
1
3
3
2
1
1
30
1
3
3
1
1
1
5
5
1
36
2
4
2
1
2
2
3
1
1
1
4
1
2
1
3
1
1
1
2
5
2
5
2
1
1
1
5
3
2
4
6
1
2
2
27
1
1
3
4
1
1
2
1
1
2
1
1
1
1
2
1
1
1
1
1
20
7
1
6
1
1
3
1
2
2
1
2
1
1
1
1
1
1
2
1
1
2
1
1
1
1
1
1
1
5
2
1
1
2
2
2
1
1
2
1
1
12
1
1
1
1
1
1
1
1
1
1
1
1
1
2
1
1
1
1
2
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:1564 Today:148 Total:28871