/
panda_script_01.py
executable file
·60 lines (36 loc) · 1.07 KB
/
panda_script_01.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/python
# -*- coding: utf-8 -*-
from panda_script_functions import *
import getpass
from pandas import * # how does this differ from next line?
import pandas
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
x = pandas.__version__
print(x)
plot arange(10)
%pylab inline
def side_by_side(*objs, **kwds):
from pandas.core.common import adjoin
space - kwds.get('space', 4)
reprs = [repr(obj).split('\n') for obj in objs]
print adjoin(space, *reprs)
plt.rc('figure', figsize=(10, 6))
# adjoin ?
# Panda series and dataframe
# R dataframe is consistent concept here.
# Index = label array
# Descriptive stats
# Doing group ops on data that easily can be grouped
# Aggregations or transformations like subtracting mean value - using group by...
# Pivot tables
# Summary of data sets.
# Merge data sets. JOIN-like.
# Time-series
# baby-names.csv = top 1000 names for both boys and girls over the years....
# record count = 2000 records per year *
# json database from usda
# json to csv => descriptive stats
# heapy and timeit
#