Pandas memory error

前端 未结 2 1066
走了就别回头了
走了就别回头了 2020-12-19 20:50

I have a csv file with ~50,000 rows and 300 columns. Performing the following operation is causing a memory error in Pandas (python):

merged_df.stack(0).rese         


        
2条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-19 21:36

    As an alternative approach you can use the library "dask"
    e.g:

    # Dataframes implement the Pandas API
    import dask.dataframe as dd`
    df = dd.read_csv('s3://.../2018-*-*.csv')

提交回复
热议问题