{"height":"190","width":"100%","provider_url":"https://hatena.blog","author_url":"https://blog.hatena.ne.jp/HK29/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhk29.hatenablog.jp%2Fentry%2F2021%2F09%2F12%2F234421\" title=\"Python 2\u5217\u304b\u3089\u306a\u308b\u30c7\u30fc\u30bf\u306b\u5bfe\u3057\u3066\u3001\u30ab\u30c6\u30b4\u30ea\u5225\u306b\u30c7\u30fc\u30bf\u3092\u30ea\u30b9\u30c8\u3067\u62bd\u51fa\u3059\u308b\u300cpandas\u306egroupby\u00d7apply\u300d - Python\u3068VBA\u3067\u4e16\u306e\u4e2d\u3092\u4fbf\u5229\u306b\u3059\u308b\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_name":"Hatena Blog","blog_url":"https://hk29.hatenablog.jp/","blog_title":"Python\u3068VBA\u3067\u4e16\u306e\u4e2d\u3092\u4fbf\u5229\u306b\u3059\u308b","version":"1.0","image_url":"https://cdn-ak.f.st-hatena.com/images/fotolife/H/HK29/20210912/20210912233407.png","title":"Python 2\u5217\u304b\u3089\u306a\u308b\u30c7\u30fc\u30bf\u306b\u5bfe\u3057\u3066\u3001\u30ab\u30c6\u30b4\u30ea\u5225\u306b\u30c7\u30fc\u30bf\u3092\u30ea\u30b9\u30c8\u3067\u62bd\u51fa\u3059\u308b\u300cpandas\u306egroupby\u00d7apply\u300d","published":"2021-09-12 23:44:21","type":"rich","categories":["Python","pandas","\u62bd\u51fa"],"description":"\u4e0b\u56f3\u306e\u3088\u3046\u306a2\u5217\u306e\u30c7\u30fc\u30bf\u304c\u3042\u308a\u307e\u3059\u3002No\u5217\u306b\u306f\u6570\u5024\u3001Label\u5217\u306b\u306f A, B, C\u3068\u3044\u30463\u3064\u306e\u30ab\u30c6\u30b4\u30ea\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u3053\u3067\u3001A, B, C\u305d\u308c\u305e\u308c\u306b\u5c5e\u3057\u3066\u3044\u308b\u6570\u5b57\u3092\u62bd\u51fa\u3057\u305f\u3044\u5834\u5408\u306e\u96db\u5f62\u30b3\u30fc\u30c9\u3092\u8f09\u305b\u307e\u3057\u305f\u3002 \u672c\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u4e0b\u56f3\u306e\u3088\u3046\u306bA, B, C\u306b\u5c5e\u3057\u3066\u3044\u308b\u6570\u5b57\u3092\u300c\u30ea\u30b9\u30c8\u300d\u3067\u62bd\u51fa\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u25a0\u672c\u30d7\u30ed\u30b0\u30e9\u30e0 import pandas as pd df = pd.read_csv('test_data.csv') print(df) df2 = df.groupby('Label')['No'].apply(list) print(df2) for index, no_li\u2026","url":"https://hk29.hatenablog.jp/entry/2021/09/12/234421","author_name":"HK29"}