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
  beginner text formatting single line to column jafrost 4 822 Apr-28-2021, 07:03 PM
Last Post: jafrost
  Remove single and double quotes from a csv file in 3 to 4 column shantanu97 0 1,094 Mar-31-2021, 10:52 AM
Last Post: shantanu97
  How to filter out Column data From Multiple rows data? firaki12345 10 1,081 Feb-06-2021, 04:54 AM
Last Post: buran
  Inserting multiple rows in a single request. swaroop 2 572 Jan-11-2021, 01:34 PM
Last Post: swaroop
  Fetching data from multiple tables in a single request. swaroop 0 380 Jan-09-2021, 04:23 PM
Last Post: swaroop
  How to append multiple <class 'str'> into a single List ahmedwaqas92 2 572 Jan-07-2021, 08:17 AM
Last Post: ahmedwaqas92
  How to melt dataframe multiple columns to one column Mekala 1 689 Sep-24-2020, 08:32 PM
Last Post: scidam
  Scripting: Multiple Votes With a Single Click or Button Ovidiu 0 492 Jul-07-2020, 10:51 AM
Last Post: Ovidiu
  SyntaxError: multiple statements found while compiling a single statement Kayode_Odeyinka 1 976 Mar-12-2020, 05:50 PM
Last Post: micseydel
  Ploting polar chart with circumference as Zero ibaad1406 0 480 Feb-10-2020, 05:53 PM
Last Post: ibaad1406

Forum Jump:

User Panel Messages

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