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

  • Home
  • SEARCH
  • 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 8722789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:29:27+00:00 2026-06-13T07:29:27+00:00

I have a basic (almost naive) question for plotting on top of a pandas

  • 0

I have a basic (almost naive) question for plotting on top of a pandas df. Given the df below I am trying to do a stack bar plot for ‘stats_value’ and ‘read1_length’ v/s ‘lib_name’.

    temp1=

               parent_library_name lib_name stats_value  read1_length
    58                  None     CXYY         106           150
    311                 CXYY     CSGW         128           150
    432                 CXYY     CSNS         109           150
    552                 CXYY     CXPS         125           150
    671                 CXYY     CXOA         123           150
    1113                CXYY     CXOC         108           150
    1394                CXYY     CXOO         129           150
    1675                CXYY     CXOP         101           150
    1794                CXYY     CXSP         132           150
    1914                CXYY     CXOY         116           150
    2356                CXYY     CXSO          69           150
    2635                CXYY     CSHT          77           150
    2914                CXYY     CXSU          76           150

Tried the following things:

c=temp1.set_index('lib_name')
c[['stats_value','read1_length']].plot(kind='bar',stacked=True)

Error:
TypeError: unsupported operand type(s) for +: 'numpy.float64' and 'str'

Tried something simple just to test:

c=temp1.set_index('lib_name')
c[['stats_value']].plot()

Error:
AttributeError: 'numpy.ndarray' object has no attribute 'find'

So I think I am missing some trick here.

Best,
-Abhi

  • 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-13T07:29:27+00:00Added an answer on June 13, 2026 at 7:29 am

    dtype of the stats_value was not correct …plotting works again..

    -A

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a basic math question. I am trying to get a percentage from
I have a MultiThreading issue and conceptual question using Visual Basic (but it applies
So I have almost no iphone programming experience, yet I have found some basic
I think this is almost certainly a very basic question but I'm struggling with
I've spent almost 4 hours trying to get past this issue... I have a
I have limited programming experience, and almost none with PHP. However I've been given
We have a bar with filters in almost all of our table-based views in
So I have a basic CRUD I am working on, and Im trying to
I have basic Spring MVC 3 setup for i18n where I can show labels
I have basic idea on Kilo Virtual Machine on Mobiles , I have clear

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.