Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9100067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:46:32+00:00 2026-06-17T00:46:32+00:00

Given: ser = Series([‘one’, ‘two’, ‘three’, ‘two’, ‘two’]) How do I plot a basic

  • 0

Given:

ser = Series(['one', 'two', 'three', 'two', 'two'])

How do I plot a basic histogram of these values?

Here is an ASCII version of what I’d want to see in matplotlib:

     X
 X   X   X
-------------
one two three

I’m tired of seeing:

TypeError: cannot concatenate 'str' and 'float' objects
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T00:46:33+00:00Added an answer on June 17, 2026 at 12:46 am

    You could use the value_counts method:

    In [10]: ser.value_counts()
    Out[10]: 
    two      3
    one      1
    three    1
    

    and then plot this as a bar chart:

    ser.value_counts().plot(kind='bar')
    

    Edit: I noticed that this doesn’t keep the desired order. If you have a list/Series for this ordering (in this case ser[:3] will do) you can reindex before plotting:

    In [12]: ser.value_counts().reindex(ser[:3])
    Out[12]: 
    one      1
    two      3
    three    1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given a global vector list of ASCII codes and corresponding number values and a
Given the two Entities ProcessTemplateOperation and ProcessTemplateMetaInformation with a relation 1 to 0..1 When
Given this CSS: #gbox_MyGrid .s-ico span { display:none; } How would one apply this
Given my two db tables aliases and subscriber have entries like this: aliases.username =
Given the date, 2009/04/30, in one of the rows I want to retrieve all
Is it possible to ser a function to start in a given date and
Given this simplified data format: <a> <b> <c>C1</c> <d>D1</d> <e>E1</e> <f>don't select this one</f>
Given an array of n integers, where one element appears more than n/2 times.
Given a list of values (e.g. 10, 15, 20, 30, 70), values N (e.g.
Given the following string; ....00.3276021,,,constString1=31;garbage=00:00:00.0090000;constString2=16;garbage2=00.00... How can I extract the values for constString1 and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.