Python Forum

Full Version: How to do a graph in Python? (and proper terminology)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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
(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