Python Virtual Training For Arcesium - Module I - Day 1

Aug 17-21, 2020 Vikrant Patil

These notes are available online at http://notes.pipal.in/2020/arcesium_finop_batch2/module1-day1.html

© Pipal Academy LLP

Day 1 | Day 2 | Day 3 | Day 4 | Day 5

We will be using jupyter hub from http://lab2.pipal.in for this training.

esc + m -> covert the cell to markdown
esc +y  -> convert back the cell to code cell
shift + enter -> execute the cell

Header1

Header2

Header3

# Header1
## Header2
### Header3
In [1]:
3 + 4
Out[1]:
7

What is python programming?

multiply two and three and write down results in your notebook

In [2]:
2 + 3
sum([1, 2, 3, 4 ,5])
dom
print("hello")
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-2-76e4b4c4d2ac> in <module>
      1 2 + 3
      2 sum([1, 2, 3, 4 ,5])
----> 3 dom
      4 print("hello")

NameError: name 'dom' is not defined

Numeric and text data

Very primitive way looking at programming is manipulating numbers and text! To handle numbers and text we need to have some basic operations supported as given below

In [3]:
42 + 42
Out[3]:
84
In [4]:
42 - 42
Out[4]:
0
In [7]:
42 * 2 # multiplication
Out[7]:
84
In [8]:
5 / 2 # real division
Out[8]:
2.5
In [9]:
5 // 2 ## integer division
Out[9]:
2
In [10]:
2 ** 5 ### 2 raised to power 5
Out[10]:
32
In [11]:
5 % 2 ## remainder when 5 divided by 2
Out[11]:
1

Numerci data is divided in two parts, integers and real numbers.

In [12]:
1.1 + 1.1
Out[12]:
2.2
In [13]:
1.0 - 0.1
Out[13]:
0.9
In [14]:
1.0 * 2
Out[14]:
2.0
In [15]:
5.0 / 2
Out[15]:
2.5
In [16]:
5.0 // 2.0
Out[16]:
2.0
In [17]:
2.0 ** 5
Out[17]:
32.0

The basic arithmatic opeartions we are doing using something called opeartors. These symbols, operators have got some priority

1+2**5%5/2*7
Opeartor     priority
**           1
% // / *     2
+ -          3

operators with same priority , the one that comes first from left to right (in the statement) will get high priority.

1+2**5%5/2*7
1+32%5/2*7
1 + 2 /2 *7
1 + 1 * 7
1 + 7
8

If we want to change the priority?

In [18]:
7 + 2*3
Out[18]:
13
In [19]:
(7+2)*3
Out[19]:
27

Now lets look at text data

In [20]:
"Hello this is text data"
Out[20]:
'Hello this is text data'
In [21]:
'Hello this is also text data'
Out[21]:
'Hello this is also text data'

Python also has multiline string. multiline string starts with 3 quotes, double or single anything is fine

In [22]:
"""This is first line of my poem
And this is second
and lst one
"""
Out[22]:
'This is first line of my poem\nAnd this is second\nand lst one\n'

\n is special character called newline char. all special characters are represented \ escape character

===========     ====
escape char     mean
===========     ====
\n              new line
\t              tab
\\              \

text data also supports some operators

In [23]:
"hello" + "world"
Out[23]:
'helloworld'
In [24]:
"*"*5
Out[24]:
'*****'

problems

  1. Use python to convert asset value, 20345.5 originally in EUR to INR
  2. Compound interest is calculated using formula P(1+r/n)^nt. Where P is principle amount, r is nomical rate of interest per year. n is frequency of compunding per year and t is number of years the investment is done. Compute compound interest for principle amount of 26780 , rate of interest 7%, compounding happens quarterly, investment is done for 5 years.
In [25]:
2(2+3)
<>:1: SyntaxWarning: 'int' object is not callable; perhaps you missed a comma?
<>:1: SyntaxWarning: 'int' object is not callable; perhaps you missed a comma?
<ipython-input-25-8b8375460855>:1: SyntaxWarning: 'int' object is not callable; perhaps you missed a comma?
  2(2+3)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-25-8b8375460855> in <module>
----> 1 2(2+3)

TypeError: 'int' object is not callable
In [26]:
2*(2+3)
Out[26]:
10
In [27]:
26780(1+0.07/4)**(4*5)
<>:1: SyntaxWarning: 'int' object is not callable; perhaps you missed a comma?
<>:1: SyntaxWarning: 'int' object is not callable; perhaps you missed a comma?
<ipython-input-27-a30b5869ff10>:1: SyntaxWarning: 'int' object is not callable; perhaps you missed a comma?
  26780(1+0.07/4)**(4*5)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-27-a30b5869ff10> in <module>
----> 1 26780(1+0.07/4)**(4*5)

TypeError: 'int' object is not callable
In [28]:
26780*(1+0.07/4)**(4*5)
Out[28]:
37887.76008234032

Variables and Literals

We saw arithmatic operators. Now lets look at one interesting operator = , assignment operator.

In [29]:
x = 10

This statement results in creation of object which is result on right hand side, 10 (integer). It stores the object in python's memory. Python has got namespace. In the current namespce it will create a name called x. Then it will create a link between this name x and the memory location where it stored 10. As a result, whenever you refer x! it goes through the link and fetches the the value

In [30]:
x
Out[30]:
10
In [31]:
x = 10
y = 20
x = y ## both will refer to same location which will have value of 20
In [32]:
x
Out[32]:
20
In [33]:
y
Out[33]:
20
In [34]:
x = 20
x = y
x = 22
y
Out[34]:
20
In [36]:
10
Out[36]:
10
In [37]:
x
Out[37]:
22

Be carefull with string literals

In [38]:
vikrant = 10
In [40]:
vikrant
Out[40]:
10
In [41]:
"vikrant" # litteral string
Out[41]:
'vikrant'
In [42]:
"vikrant"
Out[42]:
'vikrant'
In [43]:
vikrant
Out[43]:
10

What can be used as variable name!

  1. The variable name can not start with number
  2. it can be a single word (meaning no space hyphen comma, in between, not allowed)
  3. It can alphabets (A to Z , a to z) , numbers (0 to 9) and underscore
In [45]:
this_is_variable  = 10
In [47]:
this_also_232 = 232
In [48]:
invalid variable name = 12
  File "<ipython-input-48-68a2e70f5b86>", line 1
    invalid variable name = 12
            ^
SyntaxError: invalid syntax
In [49]:
invalid_variable_name = "value"

Assignment operator allows multiple assignments at a time

In [50]:
a, b = 56, 57
In [51]:
x, y, z = 1, 2, 3
In [52]:
x
Out[52]:
1
In [53]:
y
Out[53]:
2
In [54]:
z
Out[54]:
3
In [55]:
x, y, z
Out[55]:
(1, 2, 3)

think about it

  1. What will be value of y after this?
    x = 10
    y = x
    x = x+ 10
  1. What will be value of x after executing this?
   x = 10
   y = x
   y = 25

Now that we can store things in variables lets do more fun with text

In [56]:
s = "hello"
In [58]:
s[0] # 0th char in the string
Out[58]:
'h'
In [59]:
s[4]
Out[59]:
'o'
In [60]:
s[-1] # last character
Out[60]:
'o'

indices in python work like this

    +---+---+---+---+---+---+
    | p | y | t | h | o | n |
    +---+---+---+---+---+---+
 --> 0    1   2   3   4   5 
    -6   -5  -4  -3  -2  -1  <----
In [61]:
p = "python"
In [62]:
p[0]
Out[62]:
'p'
In [63]:
[-6]
Out[63]:
[-6]
In [64]:
p[1]
Out[64]:
'y'
In [65]:
p[-5]
Out[65]:
'y'

Collections

Other than basic datatype we also feel need of colectiing basic datatypes to form array or sequence of serially arranged items. List is varsatile high level data type which allows us to keep anu number of items squentially.

In [66]:
[1, 1, 1]
Out[66]:
[1, 1, 1]
In [67]:
ones = [1, 1, 1]

You can save items of any type together

In [68]:
numbers = [1, 2, 3, 4]
In [69]:
words = ["hello", "some", "wise", "words"]
In [70]:
mixed = [1, "one", 2, "two", ones]
In [71]:
mixed
Out[71]:
[1, 'one', 2, 'two', [1, 1, 1]]
In [72]:
[['a', 'b', 'c'], [1, 1, 1]]
Out[72]:
[['a', 'b', 'c'], [1, 1, 1]]
In [73]:
mixed[0]
Out[73]:
1
In [74]:
mixed
Out[74]:
[1, 'one', 2, 'two', [1, 1, 1]]
In [75]:
mixed[0]
Out[75]:
1
In [76]:
mixed[1]
Out[76]:
'one'
In [77]:
mixed[2]
Out[77]:
2
In [78]:
mixed[3]
Out[78]:
'two'
In [79]:
mixed[4]
Out[79]:
[1, 1, 1]
In [80]:
mixed[-1]
Out[80]:
[1, 1, 1]
In [81]:
mixed[-1][1]
Out[81]:
1
In [82]:
words
Out[82]:
['hello', 'some', 'wise', 'words']
In [83]:
words[4]
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-83-eb349b743174> in <module>
----> 1 words[4]

IndexError: list index out of range
In [84]:
words[3]
Out[84]:
'words'

Just like strings lists also support few operators

In [85]:
[1, 1]*3
Out[85]:
[1, 1, 1, 1, 1, 1]
In [86]:
words
Out[86]:
['hello', 'some', 'wise', 'words']
In [89]:
words*2
Out[89]:
['hello', 'some', 'wise', 'words', 'hello', 'some', 'wise', 'words']
In [90]:
words*3
Out[90]:
['hello',
 'some',
 'wise',
 'words',
 'hello',
 'some',
 'wise',
 'words',
 'hello',
 'some',
 'wise',
 'words']
In [91]:
"one" + "two"
Out[91]:
'onetwo'
In [92]:
[0, 0, 0 ] + [1, 1]
Out[92]:
[0, 0, 0, 1, 1]
In [93]:
empty = []
In [94]:
[0] # a list with only one item in it which is 0
Out[94]:
[0]

Question How/when lists are used?

Lets say I want to send say hello to every participant in this class!

In [95]:
participant = ["akash", "hasneet", "aseet", "deepak", "saurabh"]

Similar to lists, there is another datatype called tuple. It is sibling of list.

In [97]:
color = (0, 0, 256) # round brackets
In [98]:
color[0]
Out[98]:
0
In [99]:
color[-1]
Out[99]:
256
In [100]:
color + color
Out[100]:
(0, 0, 256, 0, 0, 256)
In [101]:
color*5
Out[101]:
(0, 0, 256, 0, 0, 256, 0, 0, 256, 0, 0, 256, 0, 0, 256)
In [102]:
participant[0]
Out[102]:
'akash'
In [103]:
participant[0] = "dhaval"
In [104]:
participant
Out[104]:
['dhaval', 'hasneet', 'aseet', 'deepak', 'saurabh']
In [105]:
color[0]
Out[105]:
0
In [106]:
color
Out[106]:
(0, 0, 256)
In [108]:
color[0] = 256 # tuples once created can not be modified
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-108-b05bafe17424> in <module>
----> 1 color[0] = 256 # tuples once created can not be modified

TypeError: 'tuple' object does not support item assignment
In [109]:
s
Out[109]:
'hello'
In [110]:
s[0] = "c"
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-110-687b3f4158f1> in <module>
----> 1 s[0] = "c"

TypeError: 'str' object does not support item assignment

Dictionary

In list you save things by sequence, i.e localtion is identity.

lets say we want to store ages of persons with known name. Disctionay store key and value.

In [111]:
age = {"rupali":20, "alice":16, "maya":18, "kavya":21}
In [112]:
age['rupali']
Out[112]:
20
In [113]:
age['alice']
Out[113]:
16
In [114]:
age['kavya']
Out[114]:
21
In [116]:
age["rupali"] = 18
In [117]:
age
Out[117]:
{'rupali': 18, 'alice': 16, 'maya': 18, 'kavya': 21}

Dictionary can have only unique keys. SO anything that can be unique can be kept as key. Values can be anything.

In [118]:
scores = {"x":23, "y":22, "z":23, "m":21, "n":22}
In [119]:
scores
Out[119]:
{'x': 23, 'y': 22, 'z': 23, 'm': 21, 'n': 22}
In [120]:
scores['x']
Out[120]:
23
In [121]:
scores['z']
Out[121]:
23
In [122]:
age['seema']
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-122-cbcc04148902> in <module>
----> 1 age['seema']

KeyError: 'seema'
In [123]:
age
Out[123]:
{'rupali': 18, 'alice': 16, 'maya': 18, 'kavya': 21}
In [124]:
age['seema'] = 23
In [125]:
age['seema']
Out[125]:
23
In [126]:
stock = {"name":"IMB", "open":123, "high":125, "low":120, "close":123.5}
In [127]:
stock['name']
Out[127]:
'IMB'
In [128]:
stock['open']
Out[128]:
123
In [129]:
stock['close']
Out[129]:
123.5
In [131]:
l = [1, 1, 2] # creating we use square bracket
t = ( 1, 2, 3) # creating , we use round bracket
d = {"one":1 , "two": 2,"three": 3} # creating , we use curly bracket
In [132]:
l[0] # access is doone with []
Out[132]:
1
In [133]:
t[0]
Out[133]:
1
In [134]:
d['one']
Out[134]:
1
In [141]:
stock = {"name":"IBM",
         "open":"123", #string ... this comment
         "high":125,
         "low" :120,
         "close":123.5
        }
In [139]:
stock["open"] # this gives string/text not a number
Out[139]:
'123'
In [140]:
stock['low'] # this gives, number
Out[140]:
120
In [142]:
{"a":1 #this is a , "b":2}
  File "<ipython-input-142-fd452944e8b9>", line 1
    {"a":1 #this is a , "b":2}
                              ^
SyntaxError: unexpected EOF while parsing
In [143]:
{"a":1  , "b":2} #this is a as 1 and b as 2
Out[143]:
{'a': 1, 'b': 2}

Boolean

In [144]:
True
Out[144]:
True
In [145]:
False
Out[145]:
False

Functions

Till now we are executing only some statements. But sometimes we need to make use of multiple statements. Then we might wan to resuse those statement. We might use same statemanets to compute items with different parameters. This is handled by making functions by putting the statements together. We will start with python's built in functions

In [151]:
name= "Rupali" # collection of characters
In [152]:
numbers = [1, 1, 2, 2, 1] # collections of numbers 
In [153]:
point = (0, 0, 1) # collection of some numbers
In [154]:
stock = {"name":"IMB", "open":123, "high":125, "low":120, "close":123.5} # collections of some key value pairs
In [156]:
len(name) # lenght string/text
Out[156]:
6
In [158]:
len(numbers) # lenght of list
Out[158]:
5
In [159]:
len(point) # length of tuple
Out[159]:
3
In [160]:
len(stock) # length of dictionary
Out[160]:
5

types and conversion

In [161]:
name 
Out[161]:
'Rupali'
In [162]:
type(name)
Out[162]:
str
In [163]:
type(numbers)
Out[163]:
list
In [165]:
type(point)
Out[165]:
tuple
In [166]:
type(stock)
Out[166]:
dict
In [167]:
type(1)
Out[167]:
int
In [168]:
type(1.2)
Out[168]:
float
In [170]:
twentythree = "23" 
In [178]:
int(twentythree) # converts string 
Out[178]:
23
In [172]:
int("42")
Out[172]:
42
In [173]:
int("   42   ")
Out[173]:
42
In [174]:
str(42)
Out[174]:
'42'
In [175]:
float("23.3")
Out[175]:
23.3
In [176]:
max([23, 12, 23, 12, 34, 67, 34, 34])
Out[176]:
67
In [177]:
min([23, 12, 23, 12, 34, 67, 34, 34])
Out[177]:
12
In [179]:
words = ["one", "two", "three", "four", "five"]
In [181]:
max(words) # gives max by ASCCI order ... A-Z ..a-z
Out[181]:
'two'
In [182]:
sum([12, 23, 1, 1, 1, 1])
Out[182]:
39
In [183]:
max([23, 12, 23, 12, 34, 67, 34, 34])
Out[183]:
67
str(max([23, 12, 23, 12, 34, 67, 34, 34]))# nested function call
str(67) # inner function will be executed first
'67'

problem

  1. Use python to find total income if the person has five income sources giving income of 123330, 250000, 45555, 232130, 11123
  2. Find out how many digits are there in 42 raised to power 42
  3. Also how will you use python to find highest income from example 1
  4. Will this work?
    sum(["a","b","c","d"])

Solution 1

In [187]:
incomes = [123330, 250000, 45555, 232130, 11123]
In [188]:
sum(incomes)
Out[188]:
662138

Solution 2

In [189]:
42**42
Out[189]:
150130937545296572356771972164254457814047970568738777235893533016064
In [190]:
42
Out[190]:
42
In [191]:
p = 42**42
In [192]:
p
Out[192]:
150130937545296572356771972164254457814047970568738777235893533016064
In [193]:
str(p)
Out[193]:
'150130937545296572356771972164254457814047970568738777235893533016064'
In [194]:
len(str(42**42))
Out[194]:
69
In [196]:
len(p) # length works only on sequences like str, list, tuple, dict
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-196-b24a5120ab15> in <module>
----> 1 len(p) # length works only on sequences like str, list, tuple, dict

TypeError: object of type 'int' has no len()
In [197]:
len(str(p))
Out[197]:
69

Solution 3

In [198]:
max(incomes)
Out[198]:
250000

Solution 4

In [199]:
["a", "b", "c", "d"]
Out[199]:
['a', 'b', 'c', 'd']
In [200]:
'a' +'b'
Out[200]:
'ab'
In [201]:
sum(['a', 'b','c','d'])
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-201-866e2e641c37> in <module>
----> 1 sum(['a', 'b','c','d'])

TypeError: unsupported operand type(s) for +: 'int' and 'str'
In [202]:
0 + "a"
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-202-0023ad6f1937> in <module>
----> 1 0 + "a"

TypeError: unsupported operand type(s) for +: 'int' and 'str'
In [203]:
sum([1, 2, 3])
Out[203]:
6

List slicing

subset of list can be accessed using list slicing

In [204]:
digits = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
In [205]:
digits[2:8:2] 
Out[205]:
[2, 4, 6]
lst[start:end:step]
In [207]:
digits[1:8:3] # start at index 1 , stop at index 8 (excluded..that means stop at 7), at steps of 3
Out[207]:
[1, 4, 7]

rules to take default in list slicing

  1. if step is not given , then it is taken as 1 by default
  2. if start is not given, then it is taken as start of list.. i.e. 0
  3. if end is not given , it is taken as end of list
In [208]:
digits[:5] # take first 5
Out[208]:
[0, 1, 2, 3, 4]
In [209]:
digits[2:] # drop first two
Out[209]:
[2, 3, 4, 5, 6, 7, 8, 9]
In [210]:
digits[::2] # take alternate items
Out[210]:
[0, 2, 4, 6, 8]
In [211]:
digits[::-1] # reverse the list
Out[211]:
[9, 8, 7, 6, 5, 4, 3, 2, 1, 0]
In [212]:
digits
Out[212]:
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

it is possible to generate complicated slicings using -ve numbers for start, stop and end. but that will make your code unredable. complicated to debug. Here are few useful and well accepted slicings , just make use of them.

In [213]:
import math

if you want to install jupyter-notebook on your system with python already installed. use following command from cmd

python3 -m pip install jupyter

then go to cmd and execute

jupyter notebook

In [217]:
 
Requirement already satisfied: jupyter in /home/vikrant/anaconda3/lib/python3.8/site-packages (1.0.0)
Requirement already satisfied: ipykernel in /home/vikrant/anaconda3/lib/python3.8/site-packages (from jupyter) (5.3.2)
Requirement already satisfied: qtconsole in /home/vikrant/anaconda3/lib/python3.8/site-packages (from jupyter) (4.7.5)
Requirement already satisfied: ipywidgets in /home/vikrant/anaconda3/lib/python3.8/site-packages (from jupyter) (7.5.1)
Requirement already satisfied: jupyter-console in /home/vikrant/anaconda3/lib/python3.8/site-packages (from jupyter) (6.1.0)
Requirement already satisfied: notebook in /home/vikrant/anaconda3/lib/python3.8/site-packages (from jupyter) (6.0.3)
Requirement already satisfied: nbconvert in /home/vikrant/anaconda3/lib/python3.8/site-packages (from jupyter) (5.6.1)
Requirement already satisfied: ipython>=5.0.0 in /home/vikrant/anaconda3/lib/python3.8/site-packages (from ipykernel->jupyter) (7.16.1)
Requirement already satisfied: traitlets>=4.1.0 in /home/vikrant/anaconda3/lib/python3.8/site-packages (from ipykernel->jupyter) (4.3.3)
Requirement already satisfied: tornado>=4.2 in /home/vikrant/anaconda3/lib/python3.8/site-packages (from ipykernel->jupyter) (6.0.4)
Requirement already satisfied: jupyter-client in /home/vikrant/anaconda3/lib/python3.8/site-packages (from ipykernel->jupyter) (6.1.6)
Requirement already satisfied: qtpy in /home/vikrant/anaconda3/lib/python3.8/site-packages (from qtconsole->jupyter) (1.9.0)
Requirement already satisfied: pyzmq>=17.1 in /home/vikrant/anaconda3/lib/python3.8/site-packages (from qtconsole->jupyter) (19.0.1)
Requirement already satisfied: pygments in /home/vikrant/anaconda3/lib/python3.8/site-packages (from qtconsole->jupyter) (2.6.1)
Requirement already satisfied: ipython-genutils in /home/vikrant/anaconda3/lib/python3.8/site-packages (from qtconsole->jupyter) (0.2.0)
Requirement already satisfied: jupyter-core in /home/vikrant/anaconda3/lib/python3.8/site-packages (from qtconsole->jupyter) (4.6.3)
Requirement already satisfied: widgetsnbextension~=3.5.0 in /home/vikrant/anaconda3/lib/python3.8/site-packages (from ipywidgets->jupyter) (3.5.1)
Requirement already satisfied: nbformat>=4.2.0 in /home/vikrant/anaconda3/lib/python3.8/site-packages (from ipywidgets->jupyter) (5.0.7)
Requirement already satisfied: prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0 in /home/vikrant/anaconda3/lib/python3.8/site-packages (from jupyter-console->jupyter) (3.0.5)
Requirement already satisfied: jinja2 in /home/vikrant/anaconda3/lib/python3.8/site-packages (from notebook->jupyter) (2.11.2)
Requirement already satisfied: Send2Trash in /home/vikrant/anaconda3/lib/python3.8/site-packages (from notebook->jupyter) (1.5.0)
Requirement already satisfied: terminado>=0.8.1 in /home/vikrant/anaconda3/lib/python3.8/site-packages (from notebook->jupyter) (0.8.3)
Requirement already satisfied: prometheus-client in /home/vikrant/anaconda3/lib/python3.8/site-packages (from notebook->jupyter) (0.8.0)
Requirement already satisfied: entrypoints>=0.2.2 in /home/vikrant/anaconda3/lib/python3.8/site-packages (from nbconvert->jupyter) (0.3)
Requirement already satisfied: pandocfilters>=1.4.1 in /home/vikrant/anaconda3/lib/python3.8/site-packages (from nbconvert->jupyter) (1.4.2)
Requirement already satisfied: defusedxml in /home/vikrant/anaconda3/lib/python3.8/site-packages (from nbconvert->jupyter) (0.6.0)
Requirement already satisfied: bleach in /home/vikrant/anaconda3/lib/python3.8/site-packages (from nbconvert->jupyter) (3.1.5)
Requirement already satisfied: mistune<2,>=0.8.1 in /home/vikrant/anaconda3/lib/python3.8/site-packages (from nbconvert->jupyter) (0.8.4)
Requirement already satisfied: testpath in /home/vikrant/anaconda3/lib/python3.8/site-packages (from nbconvert->jupyter) (0.4.4)
Requirement already satisfied: jedi>=0.10 in /home/vikrant/anaconda3/lib/python3.8/site-packages (from ipython>=5.0.0->ipykernel->jupyter) (0.17.1)
Requirement already satisfied: pexpect; sys_platform != "win32" in /home/vikrant/anaconda3/lib/python3.8/site-packages (from ipython>=5.0.0->ipykernel->jupyter) (4.8.0)
Requirement already satisfied: pickleshare in /home/vikrant/anaconda3/lib/python3.8/site-packages (from ipython>=5.0.0->ipykernel->jupyter) (0.7.5)
Requirement already satisfied: setuptools>=18.5 in /home/vikrant/anaconda3/lib/python3.8/site-packages (from ipython>=5.0.0->ipykernel->jupyter) (49.2.0.post20200714)
Requirement already satisfied: backcall in /home/vikrant/anaconda3/lib/python3.8/site-packages (from ipython>=5.0.0->ipykernel->jupyter) (0.2.0)
Requirement already satisfied: decorator in /home/vikrant/anaconda3/lib/python3.8/site-packages (from ipython>=5.0.0->ipykernel->jupyter) (4.4.2)
Requirement already satisfied: six in /home/vikrant/anaconda3/lib/python3.8/site-packages (from traitlets>=4.1.0->ipykernel->jupyter) (1.15.0)
Requirement already satisfied: python-dateutil>=2.1 in /home/vikrant/anaconda3/lib/python3.8/site-packages (from jupyter-client->ipykernel->jupyter) (2.8.1)
Requirement already satisfied: jsonschema!=2.5.0,>=2.4 in /home/vikrant/anaconda3/lib/python3.8/site-packages (from nbformat>=4.2.0->ipywidgets->jupyter) (3.2.0)
Requirement already satisfied: wcwidth in /home/vikrant/anaconda3/lib/python3.8/site-packages (from prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->jupyter-console->jupyter) (0.2.5)
Requirement already satisfied: MarkupSafe>=0.23 in /home/vikrant/anaconda3/lib/python3.8/site-packages (from jinja2->notebook->jupyter) (1.1.1)
Requirement already satisfied: webencodings in /home/vikrant/anaconda3/lib/python3.8/site-packages (from bleach->nbconvert->jupyter) (0.5.1)
Requirement already satisfied: packaging in /home/vikrant/anaconda3/lib/python3.8/site-packages (from bleach->nbconvert->jupyter) (20.4)
Requirement already satisfied: parso<0.8.0,>=0.7.0 in /home/vikrant/anaconda3/lib/python3.8/site-packages (from jedi>=0.10->ipython>=5.0.0->ipykernel->jupyter) (0.7.0)
Requirement already satisfied: ptyprocess>=0.5 in /home/vikrant/anaconda3/lib/python3.8/site-packages (from pexpect; sys_platform != "win32"->ipython>=5.0.0->ipykernel->jupyter) (0.6.0)
Requirement already satisfied: attrs>=17.4.0 in /home/vikrant/anaconda3/lib/python3.8/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets->jupyter) (19.3.0)
Requirement already satisfied: pyrsistent>=0.14.0 in /home/vikrant/anaconda3/lib/python3.8/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets->jupyter) (0.16.0)
Requirement already satisfied: pyparsing>=2.0.2 in /home/vikrant/anaconda3/lib/python3.8/site-packages (from packaging->bleach->nbconvert->jupyter) (2.4.7)
WARNING: You are using pip version 20.2.1; however, version 20.2.2 is available.
You should consider upgrading via the '/home/vikrant/anaconda3/bin/python -m pip install --upgrade pip' command.
In [ ]: