データフレーム内でapply関数を使って行を結合しようとしましたができませんでした。 column(c1 + c2)の情報が同じ場合、1つのリストに行を結合したいと考えています。例えばpython:データフレーム内の行を結合する方法
Dataframe df1
c1 c2 c3
0 0 x {'a':1 ,'b':2}
1 0 x {'a':3 ,'b':4}
2 0 y {'a':5 ,'b':6}
3 0 y {'a':7 ,'b':8}
4 2 x {'a':9 ,'b':10}
5 2 x {'a':11 ,'b':12}
期待される結果
Dataframe df1
c1 c2 c3
0 0 x [{'a':1 ,'b':2},{'a':3 ,'b':4}]
1 0 y [{'a':5 ,'b':6},{'a':7 ,'b':8}]
2 2 z [{'a':9 ,'b':10},{'a':11,'b':12}]
これを確認しましたかhttp://stackoverflow.com/questions/39954668/how-to -convert-column-with-pandas-dataframeの値のリストを含む? – plasmon360
あなたが使用しているパンダやRなど何でも指定してください。 – greggo