pandas - Apache Beam 到 Pandas 数据框
问题描述
亲爱的 Beam 用户社区,我是 Apache Beam 的新手,但想利用 Beam 进行快速文件处理。现在我正在努力将 Beam 对象转换为数据框。所以我使用 convert_to_dataframe 将管道转换为延迟数据帧。我想知道是否有办法将其进一步转换为数据帧,以便我可以使用诸如 head 等 Pandas 代码操作数据帧。如果我使用 Pandas.head、pandas.regex 等方法,则会收到此错误:
apache_beam.dataframe.frame_base.WontImplementError: 'head' is not yet supported because it is `order-sensitive <https://s.apache.org/dataframe-order-sensitive-operations>`_.
If you want to peek at a large dataset consider using interactive Beam's :func:`ib.collect <apache_beam.runners.interactive.interactive_beam.collect>` with ``n`` specified, or :meth:`sample`. If you want to find the N largest elements, consider using :meth:`DeferredDataFrame.nlargest`.
我想知道我是否应该使用 ib.collect 如果是的话,我应该注意什么额外的限制?太感谢了!
解决方案
推荐阅读
- python - 为什么输入函数不返回任何内容?
- c# - 如何将编辑后的 System.Drawing.Bitmap 保存到同一个文件
- android - Dart/Flutter App 仅在模拟器中关闭和重新打开时抛出异常
- r - 给定此属性,如何使用 R 生成正交拉丁方?
- azure - Azure 逻辑 - 网关错误
- javascript - 在 React 应用中从 babel-polyfill 切换到 core-js
- c++ - Boost 1.73 日志库回归
- java - 如何从 Settings Activity 修改 MainActivity 上的数据?
- javascript - 我需要 three.js.master 文件夹才能使用 OBJLoader2.js 吗?404 未找到
- javascript - Javascript函数和常量数组