0

使用 apache-arrow js ( https://github.com/apache/arrow/tree/master/js ),我只能通过几行读取箭头文件(甚至羽毛文件)。

  const arrow = fs.readFileSync("test.feather");
  const table = apArrow.Table.from([arrow]);

但是我发现尾随零正在被删除。

在python数据框中(原始数据)

4.185771942138672,2019-12-02,2019-12-01,0.0
4.185771942138672,2019-12-03,2019-12-02,1.2

使用 arrow-js 库阅读后:

4.185771942138672,2019-12-02,2019-12-01,0
4.185771942138672,2019-12-03,2019-12-02,1.2

有没有办法避免尾随零被删除?

==== 更新 ====

补充提出这个问题的原因:我想比较 python Dataframe 和 arrow-js 从/导出的数据之间的数据,并确保 js 的输出与 python dataframe 中的输出完全相同。目前很难进行(苹果对苹果)比较,因为由于这个尾随零问题,许多行显示出差异

4

0 回答 0