如何在使用PyArrow编写parquet文件时提供parquet模式 |
您所在的位置:网站首页 › bad英语是什么意思中文怎么读 › 如何在使用PyArrow编写parquet文件时提供parquet模式 |
我有一个原始输入的csv数据,所有字段都是字符串类型。我想把这个csv转换为parquet格式。然而,在转换为parquet时,我想通过为数据提供一个自定义的模式来编写它。我正在使用PyArrow进行csv到parquet的转换。 如何在使用PyArrow将文件写入parquet时提供一个自定义模式? Here is the code I used: import pyarrow as pa import pyarrow.parquet as pq # records is a list of lists containing the rows of the csv table = pa.Table.from_pylist(records) pq.write_table(table,"sample.parquet") |
今日新闻 |
点击排行 |
|
推荐新闻 |
图片新闻 |
|
专题文章 |
CopyRight 2018-2019 实验室设备网 版权所有 win10的实时保护怎么永久关闭 |