Pandas groupby stored in a new dataframe

前端 未结 2 462
暖寄归人
暖寄归人 2021-01-22 18:44

I have the following code:

import pandas as pd
df1 = pd.DataFrame({\'Counterparty\':[\'Bank\',\'Bank\',\'GSE\',\'PSE\'],
            \'Sub Cat\':[\'Tier1\',\'Sma         


        
2条回答
  •  盖世英雄少女心
    2021-01-22 19:09

    Remove the double brackets around the 'Amount' and make them single brackets. You're telling it to only select one column.

提交回复
热议问题