Python Forum
Loop different actions for an array
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Loop different actions for an array
#5
You may need to import matplotlib,
then
for my_df in df_array :
    my_df = my_df.reset_index(drop=True)
    my_df = my_df[my_df['state'].isin(['IDLE_ERROR', 'PARTLY_UP', 'UP'])]
    my_df.plot.pie(y = 'state', figsize = (6,6))
Reply


Messages In This Thread
Loop different actions for an array - by Tibovdv - Mar-25-2021, 01:00 PM
RE: Loop different actions for an array - by jefsummers - Mar-25-2021, 06:46 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  help with accessing .txt file and performing actions SamWestlakeCann 4 301 Mar-07-2024, 07:33 PM
Last Post: deanhystad
  Loop over an an array of array Chendipeter 1 529 Nov-28-2023, 06:37 PM
Last Post: deanhystad
Question Timing actions with Python dangermaus33 0 980 Apr-19-2022, 10:08 PM
Last Post: dangermaus33
  Compare each element of an array in a logic statement without using a for loop leocsmith 3 5,764 Apr-01-2021, 07:57 PM
Last Post: deanhystad
  One-time actions when iterating ClassicalSoul 1 1,691 Apr-23-2020, 07:39 PM
Last Post: bowlofred
  Double for loop with dates in array leifeng 1 1,597 Apr-05-2020, 03:27 PM
Last Post: leifeng
  Loop through array items dynamically in a certain format bhojendra 3 2,584 Jun-11-2019, 03:37 AM
Last Post: micseydel
  change array column values without loop khalidreemy 2 3,694 May-05-2019, 09:05 AM
Last Post: DeaD_EyE
  N-Dim array manipulation in a loop, getting IndexError: too many indices for array cesardepaula 1 4,413 Mar-13-2019, 01:39 AM
Last Post: scidam
  Putting an array for each string that is printed to a loop ClaudioSimonetti 1 2,315 Feb-05-2019, 12:52 PM
Last Post: perfringo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020