In [1]:
import numpy as np
import pandas as pd

barChart


In [2]:
df = pd.DataFrame(columns=['y'], index=np.arange(10), data=np.random.random(10) * 100)
df['y'] = df['y'].map(round)
df.head()


Out[2]:
y
0 46
1 95
2 69
3 84
4 57

In [3]:
df.to_csv('./data/bar.csv', index_label='x')

lineChart


In [4]:
df = pd.DataFrame(columns=['y'], index=np.arange(100), data=sorted(np.random.random(100)**2))
df['y'] = df['y'].map(lambda x: round(x, 5))
df.head()


Out[4]:
y
0 0.00007
1 0.00027
2 0.00718
3 0.00754
4 0.01250

In [5]:
df.to_csv('./data/line.csv', index_label='x')

scatterChart


In [6]:
df = pd.DataFrame(columns=['y'], index=np.arange(20), data=np.random.random(20))
df['y'] = df['y'].map(lambda x: round(x, 2))
df.head()


Out[6]:
y
0 0.72
1 0.51
2 0.64
3 0.13
4 0.29

In [7]:
df.to_csv('./data/scatter.csv', index_label='x')

multiLineChart


In [8]:
df = pd.DataFrame(columns=['y1', 'y2', 'y3'], index=np.arange(100))
df['y1'] = pd.Series(sorted(np.random.random(100)*10)).map(lambda x: round(x, 2))
df['y2'] = pd.Series(sorted(np.random.random(100)*15)).map(lambda x: round(x, 2))
df['y3'] = pd.Series(sorted(np.random.random(100)*50)).map(lambda x: round(x, 2))
df.head()


Out[8]:
y1 y2 y3
0 0.10 0.20 0.67
1 0.19 0.22 0.85
2 0.20 0.24 1.84
3 0.20 0.36 1.95
4 0.29 0.73 2.41

In [9]:
df.to_csv('./data/multiline.csv', index_label='x')