pandas 合并单元格

import pandas as pd

df = pd.DataFrame({"animal": ("horse", "horse", "dog", "dog"), "color of fur": ("black", "white", "grey", "black"), "name": ("Blacky", "Wendy", "Rufus", "Catchy")})

mydf = df.set_index(["animal", "color of fur"])

mydf.to_excel("some_path_here.xlsx")

pandas 合并单元格_第1张图片

 

你可能感兴趣的:(Pandas数据分析,python,数据挖掘,开发语言)