pandas读取数据大小
时间: 2023-10-17 22:34:21 浏览: 162
数据分析data.rar
要获取数据的大小,可以使用Pandas的`size`属性。该属性返回数据的总元素个数。例如,如果我们有一个Excel数据文件,可以使用以下代码来获取数据的大小信息:
```python
import pandas as pd
file = pd.read_excel("path/to/file.xlsx")
print(file.size)
```
其中,`file.size`将返回数据的总元素个数。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Pandas 获取数据的尺寸信息](https://blog.csdn.net/u011699626/article/details/123117973)[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_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [Pandas分块读取大文件以及读写csv,txt文件的实用操作(待更新)](https://blog.csdn.net/maligebilaowang/article/details/119156078)[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_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文