Python for Data Science
1.3 Code cells in Colab-2
05:03
print() function be default puts a space between the arguments passed to it separated by comma. To
customize this default value we can use 'sep' as print(a,b,sep='custom filler').
1.5 Types of variables-2
08:08
Dividing by single operator "/" gives a float type output while dividing by double operator "//" gives an integer
output.
1.6 Type conversion in variables-2
08:16
Operating with a float ensures implicit type conversion of output variable.
1.7 Data structures - List-2
14:43
For indexing as list[l:r], the left value l is 'inclusive' but the right value r is 'exclusive'.
18:03
list.pop() deletes the last value of the list and also outputs it.
19:17
list.append(new) adds the 'new'entry to the list at the end.
1.8 Data structures - Tuple-2
04:01
A tuple(a,b,..) is very similar to a list, except it is an immutable variable which means we can not change the
entries in a tuple.
1.9 Data structures - Dictionary-2
05:04
Dictionaries are mutable.
07:57
In a dictionary, we can have a list value to a key.
To create a list of all the keys in a dictionary use dictionary_name.keys() function. The data type of this list is
"dict-keys".
10:14
\ is called modifier in programming languages.
1.13 List comprehension-2
04:54
To add more values to a list use list_name.append(new_value) function.
1.16 Functions - args-2
02:32
For a use defined function we can use keyword (*args) in place of parameters, which would allow it to accept
any number of arguments. In general it makes the function flexible with parameters.
1.17 Functions - kwargs-2
06:01
Positional arguments always comes first before the keyword arguments.
07:49
User defined functions can be flexible with keyword arguments too. Use (**kwarg) to make the function
flexible. The arguments thus passed to the function must be in a dictionary form.
2.1 NumPy Arrays-2
03:46
A python list allows multiple data types as it's entries. However, numpy array only allows similar data type.
2.2 NumPy Functions Part 1-2
06:44
np.linspace(start,end) in inclusive on both ends and by default create 50 evenly spaced values between a
and b.
2.4 NumPy Functions Part 3-2
10:11
All numpy operations are element wise including multiplication.
13:52
For algebraic multiplication of numpy matrices we can use @ operator.
2.5 NumPy Functions Part 4-2
00:50
Standard python functions like min() can not be used directly on a numpy array.
06:52
np.random.rand(a,b) creates a matrix of a*b size based on normal distribution.
2.9 Pandas - Series and DataFrames-2
04:28
A pandas series can be created by np.Series(list) function.
07:44
Indices of a pandas series can be modified. These new indices needs to be passed as an argument in a list
form.
11:55
A pandas dataframe can be created by pd.DataFrame(value matrix, columns = []) function. Or it can also be
done using dictionaries as, pd.DataFrame({'col':data, 'col':data})
2.10 Pandas - Accessing and Modifying Series-2
02:26
Even if we modify indices of a pandas dataframe, we can still access it's entries using traditional indices,
starting from zero.
3.1 Data Loading and Overview-2
03:19
To generate plots and show every time a plot is created, use - %matplotlib inline
3.2 Histogram-2
11:21
Binwidth ={2*IQR}/(n^(1/3)) & bins = Range/Binwidth. IQR is the interquartile percentile range which is the
difference between the 25% and 75% of the given data and n is the number of dataset rows.
3.3 Histogram with Density Curve-2
02:45
Number of bins or binwidth does not effect the kde curve. It only scales it up as per the chart area.
3.4 Boxplot-2
Box plots considers whiskers to be within 1.5 times the IQR of given data. All data points outside of this
range, would be considered as outliers.
3.15 Heatmap-2
02:52
What is the meaning of correlation being positive or negative?