from pathlib import Path from modules.get_rules_in_window import main, METADATA if __name__ == "__main__": main_path = Path(__file__).parent data_path = main_path.joinpath("data") if not data_path.exists(): data_path.mkdir(parents=True, exist_ok=True) start = input("Enter beginning of CRA window [yyyy-mm-dd]: ") df, agency, ym = main(start, path=data_path, metadata=METADATA, significant=True) print(f"Rules in CRA window: {len(df)}") print("\nRules by agency\n", agency.head(10)) print("\nRules by month\n", ym)