import pandas as pd
dic_data = {"水果1":"苹果",
"水果2":"香蕉",
"水果3":"哈密瓜",
"水果4":"橙子"
}
s8 = pd.Series(dic_data)
index_new = ['one', 'two', 'three', 'four']
s8.index = index_new
s8.index.name = "水果"
s8 = s8.to_frame().reset_index().rename(columns = {"水果":"编号",0:"水果"})
print(s8)
print(s8.to_dict("split"))print(dict(s8.to_dict("split")["data"]))
image.png