Posts

6/16/17 Notes (Still trying to fix the name search command)

Still trying to fix problems with the number of names appear and case sensitivity Tried deleting the command that eliminated case sensitivity and edited the search command so that I was searching through the “First Name” column. Then, I searched “Ella,” to see if I could get her name to appear (her name should be in the file because she’s in the attendance file). This did not work. Tried putting the case sensitivity command earlier in the code so that it’s before the creation of the “Full Name” column to see if this enables all the names to appear. This did not work. I’m going to try a different type of merge that will information that only appears on one file will still appear on the merged file when searched. I read up on the different types of merges and right now I’m using a left merge which keeps all the information in the file that’s the “left” file. I think this is the correct merging format, but I need to edit the code so that the Attendance file is the left merg...

6/15/17 Notes (fixing case sensitivity)

Trying to fix the “Full Name” search I double checked the heading that appeared to make sure it had a “Full Name” heading, and it does. I tried “ella hubbell” instead of “Ella Hubbell” this had no effect I tried adding this command so that the file had its own “Full Name” collumn. Studentinfo14['Full Name']= Studentinfo14['First Name'] + ' ' + Studentinfo14['Last Name'] This did not work Tried renaming the column to FULL NAME so that the code wasn’t searching through  multiple columns named “Full Name” this did not work I tried the name of someone who was in 14-15, this did not work. I checked the “Confidence and Self-Efficiancy 14” survey file to see if Ella Hubbell responded to the questions, and her name was not in this file. I looked at the “Full Name” column I made in the “Studentinfo14” file and searched the name “Dawn Dinh” because her name was in the column. This worked! However, only six names appear which is a ...

6/14/17 Notes

I want to write a code so that I can search the name of a class, and everyone who took that class will appear. Originally I assumed I could use the same command I did to search for a specific name, and then edit that so the code would search for a specific person. However, looking at the format of the file, there are four different columns that contain class information, while there’s only one column with name information. I am going to see if I can search for a specific class in the “Am S1” column first to see if everything runs smoothly, and if that works, I will look for ways to search for an ID word in multiple columns. I tried this command. Only the column headings are appearing and nothing else Studentinfo14[Studentinfo14['Am S1'].str.contains('Discovery', na=False)] I changed “Studentinfo14” to attendance so that the code would look for this information in the attendance file instead of the master file. This worked, but using this file means that I ca...

6/06/17 Notes (editing the format of Torri's code to match with mine)

Now working on merging Torri’s file to mine so the average STEM #s can be viewed with all the other information I uploaded Torri’s code onto my computer, I have to edit it so that the names of the files are the same on both our codes so everything runs smoothly. I moved every digit over one because the file Torri used didn’t have the “Time” column and mine did. Cell 8 I got an error saying there was a mismatched # of values. I tried copying and pasting my column headers into Torri’s code (because I have the correct # of column headers for this file). This did not work. I changed “iloc” to “loc” this did not work I copied and pasted my columns from the 2017 file and this worked!

6/06/17 Notes (formatting code and searching for a specific person)

Working on fixing the format of the code, deleting cells, and making sure everything in an organized order to make it easier to use Earlier I was having a problem displaying the Confidence survey chart so I renamed all the columns and then it displayed. I now found that the command “ConfidenceS#.lock[:,:] also works, and is much more efficient because now I don’t have to go through each survey and copy and past the column names for every year of every survey. This works for all of them except Semantics, not sure why. I finished adding all the survey information I needed to merge all the surveys for 2014. I keep getting errors in the cells that deal with inverting numbered responses because certain column headers “don’t exist.” This means I actually will have to rename all the columns. However, for some reason this does not affect the cells that merge all the data. I successfully uploaded all the files onto the code and merged all the surveys and the attendance spreadsheet to...

Searching for a Specific Person.

This command enables you to find the information for a specific person filename[filename['Full Name'].str.contains('Person's Name', na=False)]

6/05/17 Notes (Combining First Name and Last Name into one column)

Notes Trying to make “First Name” and “Last Name” both id words (instead of just first name) Tried defining “firstlast as ‘First Name’ & ‘Last Name’ then merging using ‘firstlast’ this did not work. Tried using a comma instead of &. This did not work. Tried using syntax I found online. This did not work. left_on='First Name' and 'Last Name' right_on='First Name' and 'Last Name') Tried deleting the space between “and” this did not work. Tried replacing “and” with a comma. This did not work. Tried typing “AND” instead of “and” this did not work I couldn’t find anything that worked to make two id words so instead I’m trying to find a way to merge the columns “First Name” and “Last Name” together so I can have one “Name” column. Tried using this syntax I found online. This did not work ConfidenceS14['Name'] = ConfidenceS14['First Name'].map(str) + ConfidenceS14['Last Name'] I also ...