-3
How do I create a Data Frame Pandas through a dictionary counting only 1 key and 1 value
dic = {'banco': 0,
'correndo': 1,
'da': 2,
'de': 3,
'depois': 4,
'descasnando': 5,
'foi': 6,
'ladrão': 7,
'no': 8,
'praça': 9,
'roubando': 10,
'roubar': 11,
'saiu': 12,
'um': 13,
'visto': 14}
When I do pd.DataFrame(dic).T
it creates the data frame being the indexes the words and not 0 to 14.
Expected Departure:
0 banco 0
1 correndo 1
2 da 2
3 de 3
4 depois 4
5 descasnando 5
6 foi 6
7 ladrão 7
8 no 8
9 praça 9
10 roubando 10
11 roubar 11
12 saiu 12
13 um 13
14 visto 14
Please say how you want the output to be
– Flavio Moraes
good question )
– Naokity
these values that are in the dictionary are also part of the dataframe )
– Naokity
The answer below does not satisfy what you want?
– Flavio Moraes