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 7967709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:57:58+00:00 2026-06-04T06:57:58+00:00

Using Ipython notebook and the pandas module, I have a bit of code that

  • 0

Using Ipython notebook and the pandas module, I have a bit of code that iterates through a series and makes a number of bar charts (or is supposed to). It only produces the last chart that it should. The data is the funds raised by day and radio show, and I want a chart for each day. I suspect this may be a combo pandas/ipython problem, but I don’t know how to approach it.

The code is this:

print pledge[pledge.Date==k[0]].groupby('Break')['Amount'].sum().plot(kind='bar')
kcount =0;••••••••••••••••••••
for k, v in grouped.Amount.iteritems():
    if k[0] <> kcount:
        kcount=k[0]
        print k[0];
        print pledge[pledge.Date==k[0]].groupby('Break')['Amount'].sum().plot(kind='bar')

and the output I get is

05/02/2012 

Axes(0.125,0.125;0.775x0.775)

05/03/2012

Axes(0.125,0.125;0.775x0.775) 

05/04/2012 

Axes(0.125,0.125;0.775x0.775)

05/05/2012 

Axes(0.125,0.125;0.775x0.775) 

05/06/2012

Axes(0.125,0.125;0.775x0.775)

Bar chart

With only a single chart at the end, of the last iteration.

  • 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-04T06:57:59+00:00Added an answer on June 4, 2026 at 6:57 am

    Each of those plots appears on the same subplot; pandas creates a figure in the first plot call but leaves it to you to create further figures and subplots after that. Try inserting plt.figure() (cf. import matplotlib.pyplot as plt) before each plot command.

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

Sidebar

Related Questions

I'm using IPython web notebook and there's a prompt number before each block such
I am using IPython Notebook and want to ramp things up and get the
I am using iPython to run my code. I wonder if there is any
I have a unicode string retrieved from a webservice using the requests module ,
Using report builder 3.0, I have a report that queries a cube. How do
Using Rails 3.2.0.rc2 and ruby 1.9.3p0 In app/views/requests/_form.html.erb I have the following code for
When using IPython, osx terminal and remoting into an ubuntu server. I noticed that
I have a numpy script that -- according to top -- is using about
While using the re module in ipython I noticed an undocumented template function: In
I'm building some interactive workflows in IPython using the fantastic Notebook for interactive analysis

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.