Nabih Bawazir
Nabih Bawazir

Reputation: 7275

Converting dtype('int64') to pandas dataframe

Here's my data with type dtype('int64')

Portugal    76
Germany     536
Argentina   637

What I need is make it pandas dataframe with, I need this is pandas dataframe

Country     Count
Portugal    76
Germany     536
Argentina   637

Upvotes: 2

Views: 3731

Answers (1)

jezrael
jezrael

Reputation: 863701

I think input data are Series, so need:

df = df.reset_index() 

Upvotes: 4

Related Questions