【问题标题】:No Ram Reduction with Pandas Dataframe to Sqlite DB使用 Pandas Dataframe 到 Sqlite DB 不会减少 Ram
【发布时间】:2018-12-06 07:41:27
【问题描述】:

我在这方面找不到任何东西。为什么使用 pandas 数据框创建 sqlite 数据库然后删除数据框不会减少我的 ram 使用量?我正在使用 pandas、sqlite 和 sqlalchemy 的组合

con = create_engine('sqlite:///k.db')
df.to_sql('df', con, if_exists='replace', 
                     #index=False, 
                     #index_label=None, 
                     #schema=None, 
                     chunksize=2000#,
                     #dtype=None
                    )
del df

【问题讨论】:

标签: python sqlite sqlalchemy


【解决方案1】:

我发现在这种情况下,在 ram 中形成了一个 sqlite 数据库,因此不会获得 ram 的增益。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-22
    • 2019-07-17
    • 1970-01-01
    • 2020-04-07
    • 1970-01-01
    相关资源
    最近更新 更多