【问题标题】:How to insert txt file to sklearn using Jupyter notebook如何使用 Jupyter 笔记本将 txt 文件插入 sklearn
【发布时间】:2020-05-08 00:24:35
【问题描述】:

我正在尝试通过 txt 文件将庞大的数据集加载到 sklearn 系统中。或者有没有简单的上传方法

【问题讨论】:

  • 这太宽泛/模糊了。

标签: python scikit-learn sklearn-pandas


【解决方案1】:

你读它有什么问题? 作为一般建议,您可以分块阅读:

chunksize = 10000
for chunk in pd.read_csv(filename, chunksize=chunksize):
    # do whatever you suppose to

根据您的 PC 配置正确指定 chunksize 参数。 您可以阅读this question 了解更多选项。

【讨论】:

    猜你喜欢
    • 2021-05-28
    • 2019-12-28
    • 1970-01-01
    • 2020-04-20
    • 2018-03-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多