Python Forum
How to do a graph in Python? (and proper terminology)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to do a graph in Python? (and proper terminology)
#1
Photo 
Hi everyone - I have a few questions I hope you can help me with.

  1. I am using Pandas and NumPy, are these called libraries?
    Is there somewhere I can see a list of all functions with what they do? I am focusing on using Excel within Python.


I also ran the code below:

pd.value_counts(excl['Pop']).plot.bar()
This code works but the graph is the same all across when it shouldn't. I would like to sum all values found in the 'Pop' column and group by the 'State' column.
Reply
#2
Yes, they are libraries.
Pandas documentation: https://pandas.pydata.org/pandas-docs/st...index.html
Numpy reference: https://numpy.org/doc/stable/reference/index.html
Graphing with matplotlib: https://matplotlib.org/3.3.3/contents.html

These are big topics, there are a number of books written about Pandas/Numpy/Matplotlib/Scikit-Learn
Reply
#3
(Dec-21-2020, 11:43 PM)jpy Wrote: Hi everyone - I have a few questions I hope you can help me with.

  1. I am using Pandas and NumPy, are these called libraries?
    Is there somewhere I can see a list of all functions with what they do? I am focusing on using Excel within Python.


I also ran the code below:

pd.value_counts(excl['Pop']).plot.bar()
This code works but the graph is the same all across when it shouldn't. I would like to sum all values found in the 'Pop' column and group by the 'State' column.

In Python they are often called modules, but libraries would be the same.
To make a graph in Python you have several options like matplotlib, plotly, bokeh, seaborn, altair and pygal. Matplotlib is one of the more popular modules. Some examples: matplotlib, seaborn, altair, plotly

Not sure if I understand correctly, but Pandas has a sum value, you can fetch all values like this

X = df['B']
where B is your column name. Then call sum() on it
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Draw graph (Python) Eberle 1 3,427 May-28-2019, 05:29 AM
Last Post: heiner55
  "Use proper inputs to download stock data" Alberto 15 9,307 Jan-29-2018, 02:03 PM
Last Post: Alberto
  Using a list as a Y value in a python graph Afterdarkreader 5 3,847 Dec-14-2017, 10:54 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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