Example #1
0
    def call_hist(self, other_args: List[str]):
        """Process hist command"""
        parser = argparse.ArgumentParser(
            formatter_class=argparse.ArgumentDefaultsHelpFormatter,
            add_help=False,
            prog="hist",
            description="""
                Histogram with density and rug
            """,
        )
        parser.add_argument(
            "-b", "--bins", type=check_positive, default=15, dest="n_bins"
        )
        try:
            ns_parser = parse_known_args_and_warn(parser, other_args)
            if not ns_parser:
                return

            qa_view.display_hist(
                name=self.ticker,
                df=self.stock,
                target=self.target,
                bins=ns_parser.n_bins,
            )

        except Exception as e:
            print(e, "\n")
 def call_hist(self, other_args: List[str]):
     """Process hist command"""
     parser = argparse.ArgumentParser(
         formatter_class=argparse.ArgumentDefaultsHelpFormatter,
         add_help=False,
         prog="hist",
         description="""
             Histogram with density and rug
         """,
     )
     parser.add_argument("-b",
                         "--bins",
                         type=check_positive,
                         default=15,
                         dest="n_bins")
     ns_parser = parse_known_args_and_warn(parser, other_args)
     if ns_parser:
         qa_view.display_hist(
             name="",
             df=self.current_source_dataframe,
             target=self.current_id,
             bins=ns_parser.n_bins,
         )