我有一个蟒蛇列列表col_list = [name, age, address.city, address.street, address.zipcode, address.state]这是我在Pyspark中选择的。df = df.select(*[col(c) for c in col_list]).alias(c.replace('.', '_'))上面的语句创建了一个包含列名称的平面数据帧 - 名称,年龄,城市,街道,邮政编码,州,但我需要列名称,如 - address_city,address_street,address_zipcode,address_state。任何建议。
添加回答
举报
0/150
提交
取消