Yesterday, I worked for about a half hour on generating the historical report.
On Monday, I tried to index the central dataframe using a MultiIndex (timestamp, room #) so that I could select data by time, but encountered some KeyErrors when I tried to actually get a specific row. In the debugging process yesterday, I took a step back, created a test DataFrame, and tried to index it. This helped me realize my very simple mistake -- that I should have been using .loc instead of just appending brackets to the name of the DataFrame! Additionally, I started planning out exactly how I was going to select a week of data. The most likely option seems to be taking the desired start time, adding one week to it, and getting all of the data in between. (I had considered using some kind of for loop to separate out each interval, but some weeks may be missing some intervals due to days off from school or other issues. Therefore, I decided to separate out each interval after selecting the initial week of data.) Comments are closed.
|
AuthorI'm a high school senior and programming enthusiast. Archives
March 2022
Categories |