5.4 KiB
5.4 KiB
In [1]:
# Some configs that should not be shown!
import warnings
warnings.simplefilter(action="ignore", category=FutureWarning)
In [2]:
!pip install pandas==1.5.2 -q
!pip install matplotlib==3.6.2 -q
Import the classes necessary to run the software.
In [3]:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
A bit of sample code!
In [4]:
a = 1
for i in range(1, 10):
a *= i
a
Out[4]:
Acces a document by key.
In [5]:
# get a document by key
some_dict = {"test": 1, "more content": "some_more1", "more content1": "some_more2"}
some_dict
Out[5]:
Pandas Example!
In [6]:
df = pd.DataFrame([some_dict] * 10)
print(df.head().to_latex())
In [14]:
%%capture
N = 400
t = np.linspace(0, 2 * np.pi, N)
r = 0.5 + np.cos(t)
x, y = r * np.cos(t), r * np.sin(t)
fig, ax = plt.subplots()
ax.plot(x, y, "k")
ax.set(aspect=1)
plt.show()
plt.savefig("diagramm.png")
End here¶
This should not be shown!
In [7]: