我的输出看起来像这样:
nutrition_info_256174499 = df1.loc[:"Salt" , "%Reference Intake*"]
print (nutrition_info_256174499)
Typical Values
Energy 5%
Fat 1%
of which saturates 1%
Carbohydrates 7%
of which sugars 2%
Fibre -
Protein 7%
Salt 6%
Name: %Reference Intake*, dtype: object
必须做什么才能在输出末尾同时删除 Name 和 dtype?
原文由 Nabih 发布,翻译遵循 CC BY-SA 4.0 许可协议
使用
.values
属性。例子:
您可以转换为列表或访问每个值: