pab*_*agn 6 python dataframe python-polars
Polars.read_csv()我正在通过 Python 文件处理程序使用方法读取数据集: with gzip.open(os.path.join(getParameters()['rdir'], dataset)) as compressed_file:
df = pl.read_csv(compressed_file, sep = '\t', ignore_errors=True)
Run Code Online (Sandbox Code Playgroud)
Polars found a filename. Ensure you pass a path to the file instead of a python file object when possible for best performance.
Run Code Online (Sandbox Code Playgroud)
任何关于如何摆脱这个恼人的消息的想法将受到高度赞赏。
小智 4
我在从对象打开时遇到了类似的问题ZipFile。.read()解决方案是在文件名中添加一个方法。也许同样的方法也适用于你的情况?
with gzip.open(os.path.join(getParameters()['rdir'], dataset)) as compressed_file:
df = pl.read_csv(compressed_file.read(), sep = '\t', ignore_errors=True)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
778 次 |
| 最近记录: |