就诊指南

电话咨询

门诊时间(全年无休)8:00-20:00

2025年小雪补充膳食纤维一周七天三餐食谱

有家健康网 2025-04-20阅读量:3931


KeyError Traceback (most recent call last)
File /usr/local/lib/python3.10/site-packages/pandas/core/indexes/base.py:3805, in Index.get_loc(self, key)
3804 try:
-> 3805 return self._engine.get_loc(casted_key)
3806 except KeyError as err:

File index.pyx:167, in pandas._libs.index.IndexEngine.get_loc()

File index.pyx:196, in pandas._libs.index.IndexEngine.get_loc()

File pandas/_libs/hashtable_class_helper.pxi:7081, in pandas._libs.hashtable.PyObjectHashTable.get_item()

File pandas/_libs/hashtable_class_helper.pxi:7089, in pandas._libs.hashtable.PyObjectHashTable.get_item()

KeyError: ‘膳食纤维’

The above exception was the direct cause of the following exception:

KeyError Traceback (most recent call last)
Cell In[1], line 26
23 df_recipes = pd.DataFrame(recipes)
25 # 计算每日膳食纤维总量
—> 26 df_recipes[‘每日膳食纤维总量’] = df_recipes[‘膳食纤维’].sum()
28 # 保存为Excel文件
29 file_path = ‘/mnt/data/2025_xiaoxue_diet_fiber.xlsx’

File /usr/local/lib/python3.10/site-packages/pandas/core/frame.py:4102, in DataFrame.getitem(self, key)
4100 if self.columns.nlevels > 1:
4101 return self._getitem_multilevel(key)
-> 4102 indexer = self.columns.get_loc(key)
4103 if is_integer(indexer):
4104 indexer = [indexer]

File /usr/local/lib/python3.10/site-packages/pandas/core/indexes/base.py:3812, in Index.get_loc(self, key)
3807 if isinstance(casted_key, slice) or (
3808 isinstance(casted_key, abc.Iterable)
3809 and any(isinstance(x, slice) for x in casted_key)
3810 ):
3811 raise InvalidIndexError(key)
-> 3812 raise KeyError(key) from err
3813 except TypeError:
3814 # If we have a listlike key, _check_indexing_error will raise
3815 # InvalidIndexError. Otherwise we fall through and re-raise
3816 # the TypeError.
3817 self._check_indexing_error(key)

KeyError: ‘膳食纤维’

联系我们

  • 门诊时间(全年无休)8:00-20:00

  • 医院地址:厦门市湖里区湖里大道37号

有家健康网
医院地址:厦门市湖里区湖里大道37号
胃部疾病
健康资讯浅表性胃炎慢性胃炎糜烂性胃炎萎缩性胃炎反流性胃炎胃溃疡胃窦炎胃下垂食管炎
肠道疾病
结肠炎十二指肠炎直肠炎慢性肠炎十二指肠溃疡急性肠炎肠息肉胃肠功能紊乱
胃肠症状
口臭恶心呕吐便秘腹泻打嗝胃痛胃胀胃酸胃寒烧心胃出血消化不良
就医指南
来院路线
在线咨询
预约挂号
网站地图

ICP备案号:粤ICP备19122149号

本站内容仅供咨询参考,不代替您的医生或其他医务人员的建议,更不宜作为自行诊断或治疗依据,如果您对自己健康方面的问题有疑问,请及时到医院就诊!