您是否有理由无法在下一行设置列名称?
my_dict = {'key1' : [1,2,3], 'key2' : [4,5,6], 'key3' :[7,8,9]}df = pd.Dataframe.from_dict(my_dict, orient='index')df.columns = ['one', 'two', 'three']应该管用。

您是否有理由无法在下一行设置列名称?
my_dict = {'key1' : [1,2,3], 'key2' : [4,5,6], 'key3' :[7,8,9]}df = pd.Dataframe.from_dict(my_dict, orient='index')df.columns = ['one', 'two', 'three']应该管用。