PYTHON FOR DATA SCIENCE


books
1. Think Stats, Allen Downey [link]
2. Introduction to Probability and Statistics for engineers and scientists, Sheldon M Ross [link]
3. Linear Algebra and Its Applications, Gilbert Strang
Video lectures: https://ocw.mit.edu/courses/mathematics/18-06-linear-algebra-spring-2010/video-lectures/4. The Elements of Statistical Learning: Trevor Hastie [Free ebook]
5.Pattern Recognition and Machine Learning, Christopher Bishop6. Deep Learning, Ian Goodfellow [free e-book chapter wise links]


to print without going to new line in loops 

print(i, end='')

input()is used to take input from user and by default it gives us input in string format  we have to convert it into other forms using type casting 

i=input ("enter the no ")

jupyter notebook

python
# , """ for comments
\ , () for multi line statements

indentation is of four spaces

x=10
printf(id(x))  print the address of x


a , b , c = 10 , 5 , 3

x=10
y=10
print(id(x))
print(id(y))   both of them will point to the same address







q=10
type(q)
prints <class 'int'>
print(q, "is of type", type(q))

isinstance()

y=10
print(isinstance(y,int))

a= 1+2j
b = 2 + 1j
c=a+b
print c

s= '''hi this is a multi
          lime string with
             three quotes'''
           
print s            
print s[1]
print s[-1] is used to print last character of the string
len (s)-1

print s[9:]
print s[5:10]


a=[10,100,1000, "hi"]    this is a list
print(a[1]) this will print 100


a=(10,100,1000,"hi") this is a tuple and once declared it can not be changed whereas python list can be changed


a = {10,100,1000} this is a set 
print a 

output 10 100 1000


sample code : 














































































































































































































































































































Comments