인사말! 내가, 내가 볼 수 있으며,이 같은 내용을 표시 datatstore에서 하나의 컬럼에서 작동하도록 노력하고파이썬에서 Datastore 쿼리하기
:
q = test.all()
q.filter("adjclose =", "adjclose")
q = db.GqlQuery("SELECT * FROM test")
results = q.fetch(5)
for p in results:
p1 = p.adjclose
print "The value is --> %f" % (p.adjclose)
내가 adjclose 열이 역사적 값을 계산해야하지만, 나는 오류를 극복 할 수 없습니다.
for c in range(len(p1)-1):
TypeError: object of type 'float' has no len()
여기 내 코드입니다!
for c in range(len(p1)-1):
p1.append(p1[c+1]-p1[c]/p1[c])
p2 = (p1[c+1]-p1[c]/p1[c])
print "the p1 value<--> %f" % (p2)
print "dfd %f" %(p1)
python을 처음 접하면 어떤 도움을 주시면 대단히 감사하겠습니다! 사전에
감사
레이 여기
이
class CalHandler(webapp.RequestHandler):
def get(self):
que = db.GqlQuery("SELECT * from test")
user_list = que.fetch(limit=100)
doRender(
self,
'memberscreen2.htm',
{'user_list': user_list})
q = test.all()
q.filter("adjclose =", "adjclose")
q = db.GqlQuery("SELECT * FROM test")
results = q.fetch(5)
for p in results:
p1 = p.adjclose
print "The value is --> %f" % (p.adjclose)
for c in range(len(p1)-1):
p1.append(p1[c+1]-p1[c]/p1[c])
print "the p1 value<--> %f" % (p2)
print "dfd %f" %(p1)