June 2023
Intermediate to advanced
316 pages
4h 31m
Japanese
[†1] 訳注:広く普及しているExcel用語に合わせてformulaを数式と訳すが、もちろん数字しか扱えないわけではない。
1 #!/usr/bin/env python 2 import sys, re, itertools, operator 3 4 # 5 # 列の定義。各列はデータと数式で構成される。 6 # 最初の2列は入力データなので、数式を持たない。 7 # 8 all_words = [(), None] 9 stop_words = [(), None] 10 non_stop_words = [(), lambda : \ 11 list(map(lambda w : \ 12 w if w not in stop_words[0] else '',\ 13 all_words[0]))] 14 unique_words = [(),lambda : 15 set([w for w in non_stop_words[0] if w!=''])] 16 counts = [(), lambda : 17 list(map(lambda w, word_list : word_list.count(w), ...
Read now
Unlock full access