Skip to content

Commit

Permalink
Revenue Adjustments Update
Browse files Browse the repository at this point in the history
- Attempted to remove all school districts in our data that are not in the edbuild data
  • Loading branch information
KVSRoyal committed May 3, 2019
1 parent 6f235cf commit 9df1162
Show file tree
Hide file tree
Showing 4 changed files with 154 additions and 79 deletions.
151 changes: 94 additions & 57 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
18 changes: 16 additions & 2 deletions funding_analysis/edbuild_data/edbuild_district_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,29 @@ def select_column(self, variable):
:param variable: The variable / column title for which all available data is being selected
:return: All data for this variable / column item in a series
"""
return self.district_data_df[variable]
# Ensure the variable is upper case
variable = variable.upper()

try:
return self.district_data_df[variable]
except KeyError:
return None

def select_columns(self, variables):
"""
Returns a pandas dataframe of all data for the given list of variables / column titles
:param variables: A list of variables / column titles for which all available data is being selected
:return: All data for these variables / column titles in a pandas dataframe
"""
return self.district_data_df[variables]
selected_columns = pandas.DataFrame()

for variable in variables:
# Ensure the variable is upper case
variable = variable.upper()

selected_columns[variable] = self.select_column(variable)

return selected_columns

def __abbreviate_column_titles(self):
"""
Expand Down
Loading

0 comments on commit 9df1162

Please sign in to comment.