Python Forum
Ploting single column with multiple category
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ploting single column with multiple category
#1
Hi All,

I have a column in a dataframe:

eg:
label
----------
1
0
-1

I want to convert in bar graph with x axis have 1 as Positive, 0 as Zero and -1 as negative and y axis is about their count %. in abve case it will be 33.33 %each. Help please.
Reply
#2
Would need to see your code, to see how your data is stored/structured.

That said, would point you to matplotlib as the library you will likely find most useful.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Create multiple/single csv file for each sql records mg24 6 1,323 Sep-29-2022, 08:06 AM
Last Post: buran
  How to combine multiple column values into 1? cubangt 15 2,633 Aug-11-2022, 08:25 PM
Last Post: cubangt
  Reshaping a single column in to multiple column using Python sahar 7 1,968 Jun-20-2022, 12:35 PM
Last Post: deanhystad
  df column aggregate and group by multiple columns SriRajesh 0 977 May-06-2022, 02:26 PM
Last Post: SriRajesh
  Transform 3 Columns into Single Column DaveG 8 1,801 Apr-04-2022, 08:42 AM
Last Post: Pedroski55
  Split single column to multiple columns SriRajesh 1 1,290 Jan-07-2022, 06:43 PM
Last Post: jefsummers
  Delete multiple comments with a single API call (facebook) Ascalon 0 2,268 Dec-04-2021, 08:33 PM
Last Post: Ascalon
  How can I assign "multiple variables" to a single "value"? Psycpus 2 1,810 Oct-04-2021, 03:29 AM
Last Post: deanhystad
  File sorting by user-chosen category Bachelar 0 1,513 Aug-28-2021, 08:14 AM
Last Post: Bachelar
  beginner text formatting single line to column jafrost 4 3,161 Apr-28-2021, 07:03 PM
Last Post: jafrost

Forum Jump:

User Panel Messages

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