I looked already at this question: pandas create named columns in dataframe from dict. However, my example is slightly different.
I have a dictionary:
my_dict = {'key1' : [1,2,3], 'key2' : [4,5,6], 'key3' :[7,8,9]}
And I created a pandas dataframe: df = pd.DataFrame.from_dict(my_dict, orient='index')
, which is row oriented. However, when writing columns = ['one', 'two', 'three']
I get an error, as in the link above.
How do I name them?