Avoiding Memory Issues For GroupBy on Large Pandas DataFrame

前端 未结 3 1144
陌清茗
陌清茗 2020-12-18 07:25

Update:

The pandas df was created like this:

df = pd.read_sql(query, engine)
encoded = pd.get_dummies(df, columns=[\'account\'])
         


        
3条回答
  •  长情又很酷
    2020-12-18 07:53

    As an idea i would say, splitting the data column wise let's say four times, and use the id for each subset to perform the operations and then remerge

提交回复
热议问题