pd.DataFrame()
时间: 2023-11-03 21:55:26 浏览: 90
浅析pandas 数据结构中的DataFrame
pd.DataFrame()是pandas库中用于创建数据框的函数。你可以通过不同的方式创建一个数据框。一种方式是直接创建一个空的数据框,然后再逐个填充数据。例如,你可以使用下面的代码创建一个简单的空数据框:
```python
import pandas as pd
df = pd.DataFrame(index=range(3), columns=['a', 'b', 'c'])
```
<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [pd.DataFrame()用法简单记录](https://blog.csdn.net/Miss_leading/article/details/115864074)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [pd.DataFrame()函数解析(最清晰的解释)](https://blog.csdn.net/TeFuirnever/article/details/93708964)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文