我正在尝试读取 CSV 文件并使用 apache_beam.dataframe 转换为 Beam 数据帧。
每当我使用梁数据框库时,我都会收到以下错误。
错误:AttributeError:类型对象“Series”没有属性“append”。您的意思是:'_append
import csv
import apache_beam as beam
from apache_beam.dataframe import convert
input_csv = 'sample.csv'
with open('{0}'.format(input_csv)) as f:
events = [ dict(row) for row in CSV.DictReader(f)]
打印(事件)
请放弃上述缩进问题,并且我没有添加 Apache Beam 数据帧 CSV.reader 逻辑。问题是,每当我导入 apache Beam 数据帧模块时,我都会收到错误。 请让我知道我错过了什么
我在Python中使用Apache Beam版本2.50.0