hamcompmentor

Hamilton Computer Mentor

Script to parse xls file of Hamilton Computer Mentor Data

I want to skiprows on the excelfile when it open it like i do with read_excel. Other option is to get the excel file sheets saved off as

Script to write the excel file. It knows the date and time (fridays 1-3 for me). It knows my name (william). It asks for input on the help I provided, and amount of people assisted.

Clean up current data. reduced date down to set, need to join times and date, recreate the data entry.

Make it a json object.

update for a login. name, date/time,

In [ ]:
 
In [ ]:
import pandas
import numpy as np
In [ ]:
menfor = pandas.read_excel('/home/wcmckee/Desktop/mentorform.xlsx', skiprows=5)
In [ ]:
shenam = pandas.ExcelFile('/home/wcmckee/Desktop/mentorform.xlsx')
In [ ]:
menlis = list()
In [ ]:
blahmen =menfor.Mentor.get_values()
In [ ]:
lisitem = list()
In [ ]:
setitem = set(lisitem)
In [ ]:
setitem
In [ ]:
lisppl = list()
In [ ]:
for blst in set(blahmen):
    print (blst)
    lisppl.append(blst)
In [ ]:
for lisp in lisppl[1:]:
    print(lisp.lower())
In [ ]:
 
In [ ]:
 
In [ ]:
 
In [ ]:
tidaf = pandas.DataFrame(pandas.to_datetime(menfor.Time))
In [ ]:
tidaf
In [ ]:
datpan = pandas.DataFrame(pandas.to_datetime(menfor.Date))
In [ ]:
retpan = pandas.DataFrame(tidaf + datpan)
In [ ]:
tidap = tidaf.join(datpan)
In [ ]:
tidap.count()
In [ ]:
tidap.columns
In [ ]:
(tidap.index)
In [ ]:
tidate = tidap.Date
In [ ]:
tival = set(tidate.values)
In [ ]:
len(tival)
In [ ]:
for tiv in tival:
    print(tiv)
In [ ]:
for ti in tival:
    print(ti)
    pantimes = pandas.DataFrame(ti)
In [ ]:
datpan
In [ ]:
for men in menfor:
    print(men)
In [ ]:
for mef in menfor.Comments:
    print(mef)
In [ ]:
for bla in blahmen:
    print(bla)
    lisitem.append(bla)
In [ ]:
menlis.append(menfor.Mentor)
In [ ]:
menlis
In [ ]:
shn = shenam.sheet_names
In [ ]:
shelist = list()
In [ ]:
shn
In [ ]:
for sh in shn:
    #print(sh)
    shelist.append((shenam.parse(sh)))
In [ ]:
hamlend = len(shelist)
In [ ]:
hamlend
In [ ]:
lisshez = list()
In [ ]:
li
In [ ]:
for lish in range(hamlend):
    print(lisshez[lish])
In [ ]:
 
In [ ]:
for lisz in lisshez:
    print(lisz.to_html)
In [ ]:
for shl in range(hamlend):
    print(shelist[shl])
    lisshez.append((shelist[shl]))
In [ ]:
 
In [ ]:
lisshez
In [ ]:
lenlis = len(lisshez)
In [ ]:
lisho = lisshez[3]
In [ ]:
lide = lisho[4:]
In [ ]:
lide
In [ ]:
for lel in range(lenlis):
    print (lisshez[lel])
In [ ]:
 
In [ ]:
 
In [ ]:
liszer = lisshez[0]
In [ ]:
for lisk in liszer:
    print(lisk)
In [ ]:
mentim = menfor.Time
In [ ]:
menvals = mentim.values
In [ ]:
lismev = list()
In [ ]:
 
In [ ]:
for mev in menvals:
    print(mev)
    lismev.append(mev)
In [ ]:
lisde = set(lismev)
In [ ]:
lisfix = list()
In [ ]:
a = lisde[~np.is(lisde)]
In [ ]:
a
In [ ]:
 
In [ ]:
for ilre in lisde:
    print (ilre)
    #print(type(ilre))
    #print (ilre[:])
    #lisfix.append(ilre)
    #il = (ilre.replace(' ', ''))
    #print(il)
In [ ]:
for lis in lisfix:
    print(str(lis.replace(' ', '')))
In [ ]:
allibs = menfor.Library.valuesal
In [ ]:
albs = set(allibs)
In [ ]:
albs

Comments

Comments powered by Disqus