Skip to main content

demo-notebook

First things first - let's install numpy and pandas

!pip uninstall numpy pandas matplotlib -y
!pip install numpy pandas matplotlib --no-cache-dir

Let's try to do something with numpy and pandas:

import pandas as pd
import numpy as np
from string import ascii_uppercase as letters
from IPython.display import display

df = pd.DataFrame(np.random.randint(0, 100, size=(100, len(letters))), columns=list(letters))
df

Let's try to do something with numpy and pandas:

import matplotlib.pyplot as plt

names = ['group_a', 'group_b', 'group_c']
values = [1, 10, 100]

plt.figure(figsize=(9, 3))

plt.subplot(131)
plt.bar(names, values)
plt.subplot(132)
plt.scatter(names, values)
plt.subplot(133)
plt.plot(names, values)
plt.suptitle('Categorical Plotting')
plt.show()

Code introspection:

?print
class Square:
color = 'SkyBlue'
def _repr_html_(self):
return '''
<div style="background: %s; width: 200px; height: 100px; border-radius: 10px;">
</div>''' % self.color
square = Square()

display(square, display_id='some-square')
import time
from IPython.display import ProgressBar

for i in ProgressBar(10):
time.sleep(0.1)