📜  从索引和列 pandas 创建字典 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:55.837000             🧑  作者: Mango

代码示例1
import pandas as pd
df = pd.DataFrame({'Name': ['John', 'Sara','Peter','Cecilia'],
                   'Age': [38, 47,63,28],
                  'City':['Boston', 'Charlotte','London','Memphis']})
df