{"blog_url":"https://upura.hatenablog.com/","provider_url":"https://hatena.blog","width":"100%","categories":["python","\u81ea\u7136\u8a00\u8a9e\u51e6\u7406"],"version":"1.0","author_name":"upura","height":"190","author_url":"https://blog.hatena.ne.jp/upura/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fupura.hatenablog.com%2Fentry%2F2023%2F11%2F05%2F193826\" title=\"\u8a00\u8a9e\u51e6\u7406100\u672c\u30ce\u30c3\u30af 2020\u300c65. \u30a2\u30ca\u30ed\u30b8\u30fc\u30bf\u30b9\u30af\u3067\u306e\u6b63\u89e3\u7387\u300d - u++\u306e\u5099\u5fd8\u9332\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","url":"https://upura.hatenablog.com/entry/2023/11/05/193826","title":"\u8a00\u8a9e\u51e6\u7406100\u672c\u30ce\u30c3\u30af 2020\u300c65. \u30a2\u30ca\u30ed\u30b8\u30fc\u30bf\u30b9\u30af\u3067\u306e\u6b63\u89e3\u7387\u300d","blog_title":"u++\u306e\u5099\u5fd8\u9332","published":"2023-11-05 19:38:26","description":"\u554f\u984c\u6587 nlp100.github.io \u554f\u984c\u306e\u6982\u8981 pandas \u3067\u8aad\u307f\u8fbc\u307f\u3001\u6b63\u89e3\u7387\u3092\u8a08\u7b97\u3057\u307e\u3059\u3002\u3044\u304f\u3064\u304b\u65b9\u6cd5\u306f\u3042\u308a\u307e\u3059\u304c\u3001\u3053\u3053\u3067\u306f\u5217\u3054\u3068\u306b\u4e00\u81f4\u3057\u3066\u3044\u308b\u304b\u5426\u304b\u306e bool \u5024\u3092\u5f97\u305f\u5f8c\u3001sum() \u3067 true \u306e\u500b\u6570\u3092\u6570\u3048\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u5024\u3092\u5217\u6570\u3067\u5272\u308b\u3068\u3001\u78ba\u7387\u306b\u5909\u63db\u3067\u304d\u307e\u3059\u3002 import pandas as pd df = pd.read_csv('ch07/ans64.txt', sep=' ', header=None) print((df[3] == df[4]).sum() / len(df))","image_url":null,"provider_name":"Hatena Blog","type":"rich"}