You are on page 1of 12

Dive

into Python

good for Ham



Python shell 1 time execute

script eds multiple line of code


modules

group of tools

e plotleb pandas scykis

g n meet

import pandas as ppd



alias

Thetions

actions


function plot graph inputarguaea

m

petplot dfbetterindex dffrequency label Ransom j

w w

function function positional

arguments keyword
name argument

Cay

inputs to a

function

Inspecting Pandas

Dataframe

lines

before firstfew

df headC s head view set of rows from

the dataframe

method

df.info C

ready Csp files from Ponda

read from a

column

suspect credit records suspect

nm

read

from

column suspect

pure a
credit records price

pnm price the column

of

heine doesnt

antan special letter

spaces

company

variables

question 2 12 to

solution a 96

ghuestion a solution

in boolean

cenecks if return

saner True false

available comparators i

7 addition
L
II Rft

Usry logic with

Dataframes

square brackets

g t

credit records credit records


720.00

price

Dauntange
I

097ohm

comparators
tow that test

returns conpen logical

price 720.00

Import

Niutplothb

import sub nodule

from matplotlib import pyplot as pet

module in
submodule

pet plot X values y values plotline

positoorhl
a chart

Pet showC arguments

Ny

Tdisplay

theplot

Axes atitleles tables

add a axis label

Pdt Klabel Letter

yaas label

pet ylabel frequency add

Title
feet title add

plot tittle

Add legends

ilad.mu
fplt.plotlx.y.babeladd

legen

on

legend C Pmt legend plot sheer

pet

Add

text

pet text Xcoord ycoord text

Modify

text

e
g on title

fontsize co

Title

Ighafeltfotistle

pet tote 1 title green

cheye Color Ty web colors

Customizing Otoph

Chaying

line color

pet plot CX y color tomato

set colors

web colors

Chengay

line width

Pet plot X l linewidth a G

Choy

og en Stil

A linestyle

pet plot y

1 i

Adding mortars

i i A

Xy Manera x

pet plot

is 2A ch I t
0

d f

Setting

a
style

Another
Malley kind
of Plots
scatter
plot
Eteat for unordered data points
i
i

i
µ

Pet scatter x Clayargument


y

chafing mortar data for overlapping data

pet scatter l Xdata y data alpha o1


I
sets transparency
I
Bar chert
best for comparison of categorical data
vertical

Plt bar df precinct


df pets abducted
w
label for heeight of
X ber
pet label C title
y
Pdb show 4
horizontal bar

pet barh L
Adding error beer

pet bar Ldf precinct df pet abductor Yerr df.cm

1
error date
Startthe
stacked bar chert bottom on top
of 1st
cherry

pet barCdfprecinct dfcat.bg taoomg

If bar
catprecinct didos
Histograms

Distribution of values on a dateset

tTth
Pet hist gravel mass

Pet snow
positional arguments the dataset

default 10 equal size of sample bch

pet bist f data bins Lynne

integer
changing range

e
pet hist data range Xmm Xmax

set rye
Normalizing

if the sample size are different


divide
sum
of the area p proportionately
the data area

pethist male weight density True

Plt hist female height density Thee


I
arteriolar

You might also like