Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Data Quest notes

Basics

Data science – Processing, analysing, visualizing and interpreting data

Why python ? – handles large datasets, mathematical functions, creates powerful visualization

Script.py (full code runs at once) and console (each line)

Expressions – (2-1)/3

Statement – print(2-1)

Function – print()

Operators –

** expo

PEMDAS

Parentheses,

Exponent

Mul or Div

Add or sub

Assigning Variables –

Assigning statement, atlanta = 123

Reserved words –

False class finally is return


None continue for lambda try
True def from nonlocal while
and del global not with
as elif if or yield
assert else import pass
break except in raise

atlanta=123

print(atlanta)
Data types-

Integer 5

Float 5.67

String ‘Pushpak’ or name=“Pushpak”

Using A List To Store Multiple Values

List

Cities = []

Cities.append(“Anaheim”)

Cities.append(371)

Print(cities)

OR

Cities= [ “mumbai’, “delhi”]

Comments - # Comment

Accesing elements in a list-

Index – 0 to n-1

Values – n

Zero indexing

Return_third = cities[2]

Print(return_third)

Length of the list – len(cities) , n

Slicing Lists

For slicing values between the starting index and ending index

two_four = cities[2:4] # returns only second and third indexed value or 3rd and 4th element of the list

You might also like