更新时间:2021-11-13 03:57:19
您可以将每条记录转换为字典,然后使用 DataFrame.from_records
:
You can convert each record to a dictionary and then use DataFrame.from_records
:
pd.DataFrame.from_records([{k: v for v, k in row} for row in addresses])
# city house house_number road
#0 arlesey beds 68 church lane
#1 arlesey beds 85 church lane
#2 arlesey beds 85 high street
#3 arlesey beds NaN high street
#4 arlesey beds NaN high street