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 together for the 2014 surveys.
- Working on finding a way to check to see if a person came to Urban scholars, if their name isn’t appearing on the chart for that year.
- Tried this command. This did not work. Error said “Bryanna Bascombe” was invalid syntax.
Bryanna Bascombe in df.<Attendance>.values
Bryanna Bascombe in df.index.values
Attendance.loc[[Bryanna Bascombe],:]
- Tried deleting <> this did not work.
- Tried replacing “Attendance” with “Full Name” this did not work.
- Tried “df.Attendance.column['Full Name'].values” This did not work.
- Tried “Bryanna Bascombe in df.Attendance.values
Bryanna Bascombe in df.'Full Name'.values
This did not work.
- Tried just “Attendance.loc[[Bryanna Bascombe],:] This did not work
- Tried Attendance.loc[['Bryanna Bascombe'],['Full Name']] This did not work
- Tried deleting ‘’ this did not work
- If I put the # in, it shows Bryanna, but only one year. Also, this is an inconvenient way to look people up.
- Tried “Attendance.loc[['Bascombe','Bryanna'],:]” (and with first name first, then last name). This did not work.
- Tried typing “Girl” instead of “Bryanna Bascombe” to see if bringing up columns in general was a problem, or just her name was a problem. This did not work.
- This syntax works! I just needed to add “na=False” so that it could display the NaN cells
- Attendance[Attendance['Full Name'].str.contains('Bryanna Bascombe', na=False)]
Comments
Post a Comment