python - Pandas series manipulation - change x and y -


i have pandas.core.series.series object x outputs following when print x:

2     681 1     575 3     573 4     381 0     340 

how can change x x2 print x2 outputs:

681     2 575     1 573     3 381     4 340     0 

i want otherwise when try plot histogram (x.plot.hist()), don't result wanted.

do want bar chart?

s.plot.bar() 

enter image description here

pd.series(s.index, index=s.values, name='a').plot.bar() 

enter image description here


histogram makes no sense way graphically represent aggregated data. series length 5... nothing aggregrate.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -