dataframe删除最后几行
时间: 2023-12-27 16:05:28 浏览: 112
Pandas DataFrame Notes
在R语言中,要删除DataFrame中的最后几行数据,可以使用以下代码:df[-dim(df)[1],。这将删除DataFrame的最后一行数据,并返回一个新的DataFrame。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [R语言删除dataframe数据中的最后一行数据](https://blog.csdn.net/weixin_57242009/article/details/125090393)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [python DataFrame获取行数、列数、索引及第几行第几列的值方法](https://download.csdn.net/download/weixin_38722348/14861411)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文