Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import pandas as pk
import numpy as np
import time as t
lk = pk.read_excel('/home/pavan/PAVANKUMAR/MachineLearning/CaseStudy/MLCP_VIsualize/DataFile.xlsx', sheetname=0)
QQ = []
class mylist:
# lk = pd.read_excel("/home/tcs/Desktop/pavan_master/mlcp_visulaize/Timestamp_split.xlsx", sheetname=0)
def NewClass(self, l):
#print l
#print l[1].tolist()
map(lambda x: map(lambda y: dum(x,y), l[x].tolist()), [1])
#print QQ
return QQ
def WeakString(string, t):
weekStr = []
#string = "Week"
map(lambda z: weekStr.append(string + `z`), range(t))
return weekStr
def dum(k,z):
zz = lk.loc[z] #df.loc[[2]]
#print zz.values.tolist()
ff = pk.DataFrame({'x': WeakString("T", 24), 'y': zz.values.tolist()})
#print ff.to_json(orient='records')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.