Kernel: Python 2
In [2]:
Out[2]:
2012-02-10T00:00:00
In [3]:
Out[3]:
0.4
0.2
0.9
In [4]:
Out[4]:
2013-10-12
2013-10-13
In [5]:
Out[5]:
In [6]:
Out[6]:
In [7]:
Out[7]:
CPI cumu_arpu graph
0 0.5 0.6 2015-03-01
1 0.4 0.1 2015-03-02
In [8]:
Out[8]:
{'CPI': [0.5, 0.2], 'cumu_arpu': [0.6, 0.4], 'graph': ['cumuarpu', 'cpi']}
CPI cumu_arpu graph
0 0.5 0.6 cumuarpu
1 0.2 0.4 cpi
[0 1]
In [9]:
Out[9]:
{'CPI': [0.5, 0.2], 'cumu_arpu': [0.6, 0.4], 'graph': ['cumuarpu', 'cpi']}
CPI cumu_arpu graph
0 0.5 0.6 cumuarpu
1 0.2 0.4 cpi
[0 1]
In [10]:
Out[10]:
{'CPI': 'CPI', 'cumu_arpu': 'cumu_arpu', 'graph': ['Item one', 'Item two', 'Item three', 'ok']}
In [11]:
Out[11]:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-11-f0b83f5dfb6b> in <module>()
2 import matplotlib.pyplot as plt
3 import numpy as np
----> 4 df = pandas.DataFrame(np.randn(8, 3), index=index,columns=['A', 'B', 'C'])
5
AttributeError: 'module' object has no attribute 'randn'
In [12]:
Out[12]:
50
the number of days to break even is 1
In [13]:
Out[13]:
the number of days to break even is 1
In [14]:
Out[14]:
[0.5, 0.4, 0.2, 0.9]
[0.5, 0.4, 0.2, 0.9, 1]
In [ ]:
In [15]:
Out[15]:
-39 227
In [16]:
Out[16]:
(-0.068396252760348761, 4.7047313404642956, -0.99697847091833169, 1.4648709256120108e-13, 0.0016067572441345482)
'\ndef breakeven(cost, revenuestreamlistvar):\n n = 0\n totalrevenue = revenuestreamlistvar[n]\n while (cost > totalrevenue) and (n < len(revenuestreamlistvar)-1):\n n = n + 1\n totalrevenue = totalrevenue + y[n]\n if cost > totalrevenue:\n while cost > totalrevenue:\n from math import log\n from scipy import stats\n import numpy as np\n xa = list(range(1, len(revenuestreamlistvar)+1))\n ya = revenuestreamlistvar\n za = map(log, y)\n aa = slope, intercept, r_value, p_value, std_err = stats.linregress(x,z)\n print a\n cost = cost*2\n n = "did not break even"\n print \'the breakeven point is %i days\' % n \n return n\n\n#breakeven(1000, y)\n'
In [17]:
In [18]:
Out[18]:
File "<ipython-input-18-541e57fd0486>", line 17
y = [600,550,500,450,400,350,300,250,200,150,100,90,80,70,60,50]
^
SyntaxError: invalid syntax
In [21]:
Out[21]:
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
[6.684611727667927, 6.551080335043404, 6.396929655216146, 6.214608098422191, 5.991464547107982, 5.703782474656201, 5.521460917862246, 5.298317366548036, 5.19295685089021, 5.075173815233827, 4.941642422609304, 4.787491742782046, 4.605170185988092, 4.382026634673881, 4.0943445622221]
In [20]:
Out[20]:
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-20-ccc331ad703d> in <module>()
15
16 for i in allstream:
---> 17 regresspath(i)
<ipython-input-20-ccc331ad703d> in regresspath(variableto)
12 a = slope, intercept, r_value, p_value, std_err = stats.linregress(x,z)
13 r = a[2]
---> 14 print dec(r**2)
15
16 for i in allstream:
NameError: global name 'dec' is not defined
In [26]:
Out[26]:
[0.6931471805599453, 2.302585092994046, 2.995732273553991, 3.912023005428146, 4.0943445622221]
In [ ]: