pythonpandas库用法
时间: 2024-01-25 17:12:38 浏览: 95
python pandas库的安装和创建
5星 · 资源好评率100%
以下是两个关于Pandas库的用法示例:
1. 创建Series对象:
```python
import pandas as pd
data = [3, 4, 5, 6]
index = ['a', 'b', 'c', 'd']
series = pd.Series(data, index=index)
```
2. 设置索引:
```python
import pandas as pd
data = [3, 4, 5, 6]
index = ['a', 'b', 'c', 'd']
series = pd.Series(data, index=index)
```
阅读全文