Import librairies


In [1]:
import numpy as np
from ipywksp import workspace
import pandas as pd

Workspace

Define workspace variable


In [2]:
workspace(theme='light') # Define a workspace variable


After defining the workspace, every defined variables will be automatically updated to the workspace

Define some variables


In [3]:
# Define integers and float numbers
a1 = 1
a2 = 54
e = 47.5
Z = 48.025



In [4]:
# Define list and set :
li = [1,2,4,8,7,9,11]
lit = [1.0, 'ok', [14, 17]]
lset = set(li)



In [5]:
# Define matrix and array :
mama = np.random.rand(3, 2)
papa = np.matrix(mama)
brother = np.ravel(papa)



In [6]:
# Define dictionnary, dataframe and series :
dico = {'mama':[45, 32, 45], 'papa':[78, 74, 45], 'son':[7,7,9]}
pdDico = pd.DataFrame(dico)
ser = pdDico['son']