Understand Python libraries (matplotlib, numpy, and pandas) and their functionalities.
Learn basic methods and attributes to create simple graphs (line graph, bar chart, histogram, and pie chart)
2. Pre-Workshop Checklist
⬡ This is pretty obvious…. but do you have your laptop with you? If
you don’t…. Perhaps go grab it?
⬡ Did you download Anaconda?
⬡ Did you have access to TD WS 1 Shared Folder? (on AIS website)
⬡ If you encounter issues → ask our Student Assistants!
2
3. “ ● Speaker Series 2 : Abha Kumar
○ 02/17 from 12-1pm
● Phillies Office Visit
○ 02/27 (9:00-12:30)
○ Signups in the Newsletter
3
AIS Upcoming Events
6. TODAY’S AGENDA
6
PART 1
LINE CHART
DIY EXERCISES
PART 3
BAR CHART
DIY EXERCISES
OVERVIEW
GENERAL CONCEPT
SETTING UP
PART 2
PIE CHART
DIY EXERCISES
PART 4
HISTOGRAM
DIY EXERCISES
REVIEW
RESOURCES
SUBMISSION & FEEDBACK
8. Python libraries
▸ pd as alias
▸ data structures and
operations
▸ data manipulation and
analysis
8
▸ np as alias
▸ multi-dimensional arrays
and matrices
▸ high-level mathematical
functions
▸ plt as alias
▸ plotting library
▸ Object-oriented API
12. Line Graph
Used to track changes over short and long
periods of time.
12
13. Some methods and attributes
plot()
Take arrays and turn them to
line graphs
show()
Used to invoke the required plot
title()
Create title for graphs
13
xlabel() and ylabel()
Create x label and y label
fontsize
Adjust the size for the titles,
xlabel, ylabel, etc.
color or c
Change color
14. Some methods and attributes
linestyle or ls
Provide a variety of styles for
lines
figure()
Manipulate and adjust things to
the figure
figsize
Change the size of your figure
14
savefig()
Save graphs to your folder
legend()
Create legend for graphs
21. Bar Chart
Used to compare differences between groups/categories.
Also used to track changes over time
21
22. Load & Understand Dataset
read_excel()
Import excel files to Jupyter
Notebook
dtypes
Check the data types in each
column of a dataset
shape
Provide number of rows and
columns in a dataset
22
head() and tail()
Load first 5 rows
Load last 5 rows
info
Identity data types and null values
color or c
Change color
23. Rename columns
& Convert df to numpy arrays
rename()
Rename one column
columns
Rename multiple columns
23
loc
Load each column’s values
values
Convert pandas df to numpy arrays
24. Some methods and attributes
bar()
Create vertical bar graphs
barh()
Create horizontal bar graphs
xticks() and yticks()
Provide reference for points on a
scale for x and y axes
24
np.arange()
Create a numpy array