def transform(self, essence_col, next_col): derived_col = dict(essence_col) derived_col['Year'] = \ Container.convertStandardDateToYear(essence_col['Date']) derived_col['YearMonth'] = \ Container.convertStandardDateToYearMonth(essence_col['Date']) derived_col['SimplifiedAlias'], \ derived_col['Account'], \ derived_col['Category'], \ derived_col['Subcategory'] = \ self.processAccountAlias(essence_col['AccountAlias']) return True, derived_col
def isSelectedRow(self, row): partial_first_month = Container.convertStandardDateToYearMonth(self.first_row['Date']) ignore_partial_first_month = (partial_first_month == row["YearMonth"]) return ( not (row["Category"] == "Banking" and row["Subcategory"] == "ML Internal Transfer") and not (row["Category"] == "Banking" and row["Subcategory"] == "Wire In") and not (row["Category"] == "Banking" and row["Subcategory"] == "Check Deposit" and row["Amount"] == "123,755.05") and not (row["Category"] == "Charitable Donations" and row["Subcategory"] == "Wire Out" and row["Amount"] == "-200,000.00") and not (row["Category"] == "Credit Card" and row["Subcategory"] == "Pay Credit Card" and row["Account"] == "Capital One") and not (row["Category"] == "Credit Card" and row["Subcategory"] == "Pay Credit Card" and row["Account"] == "Chase" and row["Date"] > "2013-07-19") and not ignore_partial_first_month ) return True