 
              エントリーの編集
 
                エントリーの編集は全ユーザーに共通の機能です。
                    必ずガイドラインを一読の上ご利用ください。
記事へのコメント1件
- 注目コメント
- 新着コメント
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
 
          - バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
How to count distinct values in a column of a pandas group by object?
I have a pandas data frame and group it by two columns (for example col1 and col2). For fixed val... I have a pandas data frame and group it by two columns (for example col1 and col2). For fixed values of col1 and col2 (i.e. for a group) I can have several different values in the col3. I would like to count the number of distinct values from the third columns. For example, If I have this as my input: 1 1 1 1 1 1 1 1 2 1 2 3 1 2 3 1 2 3 2 1 1 2 1 2 2 1 3 2 2 3 2 2 3 2 2 3 I would like to have this
 
               
            


2014/09/29 リンク