简体   繁体   English

Pandas Dataframe 加载从 Excel 中删除的数据

[英]Pandas Dataframe loading data that was deleted from Excel

I've edited an excel file and am now trying to read it df = pd.read_excel('filename') into a dataframe.我编辑了一个 excel 文件,现在正尝试将其 df = pd.read_excel('filename') 读入数据框。 The original data is showing up in the data frame but not in the excel file.原始数据显示在数据框中,但不在 Excel 文件中。 I have cleared the formatting in excel accross the entire workbook, and copy and pasted it into new tabs.我已经清除了整个工作簿中 excel 中的格式,并将其复制并粘贴到新选项卡中。

As it's seen in excel: There are two columns, one labeled keys, the other values正如在 excel 中看到的那样:有两列,一列标记为键,另一列是值

As it's seen in the data frame: There are 8 columns with their original names正如在数据框中看到的那样:有 8 列的原始名称

Update: I've opened a new excel workbook and copied all data into the new workbook and it seems to be loading the new data now.更新:我打开了一个新的 Excel 工作簿并将所有数据复制到新工作簿中,现在似乎正在加载新数据。

在再次运行代码之前重新启动内核。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM