| |
| |
| <!DOCTYPE html> |
| <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> |
| <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> |
| <head> |
| <meta charset="utf-8"> |
| |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| |
| <title>apache_beam.dataframe.doctests module — Apache Beam documentation</title> |
| |
| |
| |
| |
| |
| |
| |
| |
| <script type="text/javascript" src="_static/js/modernizr.min.js"></script> |
| |
| |
| <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script> |
| <script type="text/javascript" src="_static/jquery.js"></script> |
| <script type="text/javascript" src="_static/underscore.js"></script> |
| <script type="text/javascript" src="_static/doctools.js"></script> |
| <script type="text/javascript" src="_static/language_data.js"></script> |
| <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script> |
| |
| <script type="text/javascript" src="_static/js/theme.js"></script> |
| |
| |
| |
| |
| <link rel="stylesheet" href="_static/css/theme.css" type="text/css" /> |
| <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> |
| <link rel="index" title="Index" href="genindex.html" /> |
| <link rel="search" title="Search" href="search.html" /> |
| <link rel="next" title="apache_beam.dataframe.expressions module" href="apache_beam.dataframe.expressions.html" /> |
| <link rel="prev" title="apache_beam.dataframe.convert module" href="apache_beam.dataframe.convert.html" /> |
| </head> |
| |
| <body class="wy-body-for-nav"> |
| |
| |
| <div class="wy-grid-for-nav"> |
| |
| <nav data-toggle="wy-nav-shift" class="wy-nav-side"> |
| <div class="wy-side-scroll"> |
| <div class="wy-side-nav-search" > |
| |
| |
| |
| <a href="index.html" class="icon icon-home"> Apache Beam |
| |
| |
| |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| <div role="search"> |
| <form id="rtd-search-form" class="wy-form" action="search.html" method="get"> |
| <input type="text" name="q" placeholder="Search docs" /> |
| <input type="hidden" name="check_keywords" value="yes" /> |
| <input type="hidden" name="area" value="default" /> |
| </form> |
| </div> |
| |
| |
| </div> |
| |
| <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> |
| |
| |
| |
| |
| |
| |
| <ul class="current"> |
| <li class="toctree-l1"><a class="reference internal" href="apache_beam.coders.html">apache_beam.coders package</a></li> |
| <li class="toctree-l1 current"><a class="reference internal" href="apache_beam.dataframe.html">apache_beam.dataframe package</a><ul class="current"> |
| <li class="toctree-l2 current"><a class="reference internal" href="apache_beam.dataframe.html#submodules">Submodules</a><ul class="current"> |
| <li class="toctree-l3"><a class="reference internal" href="apache_beam.dataframe.convert.html">apache_beam.dataframe.convert module</a></li> |
| <li class="toctree-l3 current"><a class="current reference internal" href="#">apache_beam.dataframe.doctests module</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="apache_beam.dataframe.expressions.html">apache_beam.dataframe.expressions module</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="apache_beam.dataframe.frame_base.html">apache_beam.dataframe.frame_base module</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="apache_beam.dataframe.frames.html">apache_beam.dataframe.frames module</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="apache_beam.dataframe.io.html">apache_beam.dataframe.io module</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="apache_beam.dataframe.pandas_top_level_functions.html">apache_beam.dataframe.pandas_top_level_functions module</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="apache_beam.dataframe.partitionings.html">apache_beam.dataframe.partitionings module</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="apache_beam.dataframe.schemas.html">apache_beam.dataframe.schemas module</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="apache_beam.dataframe.transforms.html">apache_beam.dataframe.transforms module</a></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| <li class="toctree-l1"><a class="reference internal" href="apache_beam.io.html">apache_beam.io package</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="apache_beam.metrics.html">apache_beam.metrics package</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="apache_beam.ml.html">apache_beam.ml package</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="apache_beam.options.html">apache_beam.options package</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="apache_beam.portability.html">apache_beam.portability package</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="apache_beam.runners.html">apache_beam.runners package</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="apache_beam.transforms.html">apache_beam.transforms package</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="apache_beam.typehints.html">apache_beam.typehints package</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="apache_beam.utils.html">apache_beam.utils package</a></li> |
| </ul> |
| <ul> |
| <li class="toctree-l1"><a class="reference internal" href="apache_beam.error.html">apache_beam.error module</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="apache_beam.pipeline.html">apache_beam.pipeline module</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="apache_beam.pvalue.html">apache_beam.pvalue module</a></li> |
| </ul> |
| |
| |
| |
| </div> |
| </div> |
| </nav> |
| |
| <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> |
| |
| |
| <nav class="wy-nav-top" aria-label="top navigation"> |
| |
| <i data-toggle="wy-nav-top" class="fa fa-bars"></i> |
| <a href="index.html">Apache Beam</a> |
| |
| </nav> |
| |
| |
| <div class="wy-nav-content"> |
| |
| <div class="rst-content"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <div role="navigation" aria-label="breadcrumbs navigation"> |
| |
| <ul class="wy-breadcrumbs"> |
| |
| <li><a href="index.html">Docs</a> »</li> |
| |
| <li><a href="apache_beam.dataframe.html">apache_beam.dataframe package</a> »</li> |
| |
| <li>apache_beam.dataframe.doctests module</li> |
| |
| |
| <li class="wy-breadcrumbs-aside"> |
| |
| |
| <a href="_sources/apache_beam.dataframe.doctests.rst.txt" rel="nofollow"> View page source</a> |
| |
| |
| </li> |
| |
| </ul> |
| |
| |
| <hr/> |
| </div> |
| <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> |
| <div itemprop="articleBody"> |
| |
| <div class="section" id="module-apache_beam.dataframe.doctests"> |
| <span id="apache-beam-dataframe-doctests-module"></span><h1>apache_beam.dataframe.doctests module<a class="headerlink" href="#module-apache_beam.dataframe.doctests" title="Permalink to this headline">¶</a></h1> |
| <p>A module that allows running existing pandas doctests with Beam dataframes.</p> |
| <p>This module hooks into the doctesting framework by providing a custom |
| runner and, in particular, an OutputChecker, as well as providing a fake |
| object for mocking out the pandas module.</p> |
| <p>The (novel) sequence of events when running a doctest is as follows.</p> |
| <blockquote> |
| <div><ol class="arabic simple"> |
| <li>The test invokes <cite>pd.DataFrame(…)</cite> (or similar) and an actual dataframe |
| is computed and stashed but a Beam deferred dataframe is returned |
| in its place.</li> |
| <li>Computations are done on these “dataframes,” resulting in new objects, |
| but as these are actually deferred, only expression trees are built. |
| In the background, a mapping of id -> deferred dataframe is stored for |
| each newly created dataframe.</li> |
| <li>When any dataframe is printed out, the repr has been overwritten to |
| print <cite>Dataframe[id]</cite>. The aforementened mapping is used to map this back |
| to the actual dataframe object, which is then computed via Beam, and its |
| the (stringified) result plugged into the actual output for comparison.</li> |
| <li>The comparison is then done on the sorted lines of the expected and actual |
| values.</li> |
| </ol> |
| </div></blockquote> |
| <dl class="class"> |
| <dt id="apache_beam.dataframe.doctests.FakePandasObject"> |
| <em class="property">class </em><code class="descclassname">apache_beam.dataframe.doctests.</code><code class="descname">FakePandasObject</code><span class="sig-paren">(</span><em>pandas_obj</em>, <em>test_env</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/dataframe/doctests.html#FakePandasObject"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.dataframe.doctests.FakePandasObject" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> |
| <p>A stand-in for the wrapped pandas objects.</p> |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="apache_beam.dataframe.doctests.TestEnvironment"> |
| <em class="property">class </em><code class="descclassname">apache_beam.dataframe.doctests.</code><code class="descname">TestEnvironment</code><a class="reference internal" href="_modules/apache_beam/dataframe/doctests.html#TestEnvironment"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.dataframe.doctests.TestEnvironment" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> |
| <p>A class managing the patching (of methods, inputs, and outputs) needed |
| to run and validate tests.</p> |
| <p>These classes are patched to be able to recognize and retrieve inputs |
| and results, stored in <cite>self._inputs</cite> and <cite>self._all_frames</cite> respectively.</p> |
| <dl class="method"> |
| <dt id="apache_beam.dataframe.doctests.TestEnvironment.fake_pandas_module"> |
| <code class="descname">fake_pandas_module</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/dataframe/doctests.html#TestEnvironment.fake_pandas_module"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.dataframe.doctests.TestEnvironment.fake_pandas_module" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="apache_beam.dataframe.doctests.TestEnvironment.context"> |
| <code class="descname">context</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/dataframe/doctests.html#TestEnvironment.context"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.dataframe.doctests.TestEnvironment.context" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Creates a context within which DeferredBase types are monkey patched |
| to record ids.</p> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="apache_beam.dataframe.doctests.BeamDataframeDoctestRunner"> |
| <em class="property">class </em><code class="descclassname">apache_beam.dataframe.doctests.</code><code class="descname">BeamDataframeDoctestRunner</code><span class="sig-paren">(</span><em>env</em>, <em>use_beam=True</em>, <em>wont_implement_ok=None</em>, <em>not_implemented_ok=None</em>, <em>skip=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/dataframe/doctests.html#BeamDataframeDoctestRunner"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.dataframe.doctests.BeamDataframeDoctestRunner" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/doctest.html#doctest.DocTestRunner" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">doctest.DocTestRunner</span></code></a></p> |
| <p>A Doctest runner suitable for replacing the <cite>pd</cite> module with one backed |
| by beam.</p> |
| <dl class="method"> |
| <dt id="apache_beam.dataframe.doctests.BeamDataframeDoctestRunner.run"> |
| <code class="descname">run</code><span class="sig-paren">(</span><em>test</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/dataframe/doctests.html#BeamDataframeDoctestRunner.run"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.dataframe.doctests.BeamDataframeDoctestRunner.run" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="apache_beam.dataframe.doctests.BeamDataframeDoctestRunner.report_success"> |
| <code class="descname">report_success</code><span class="sig-paren">(</span><em>out</em>, <em>test</em>, <em>example</em>, <em>got</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/dataframe/doctests.html#BeamDataframeDoctestRunner.report_success"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.dataframe.doctests.BeamDataframeDoctestRunner.report_success" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="apache_beam.dataframe.doctests.BeamDataframeDoctestRunner.fake_pandas_module"> |
| <code class="descname">fake_pandas_module</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/dataframe/doctests.html#BeamDataframeDoctestRunner.fake_pandas_module"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.dataframe.doctests.BeamDataframeDoctestRunner.fake_pandas_module" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="apache_beam.dataframe.doctests.BeamDataframeDoctestRunner.summarize"> |
| <code class="descname">summarize</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/dataframe/doctests.html#BeamDataframeDoctestRunner.summarize"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.dataframe.doctests.BeamDataframeDoctestRunner.summarize" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="apache_beam.dataframe.doctests.BeamDataframeDoctestRunner.summary"> |
| <code class="descname">summary</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/dataframe/doctests.html#BeamDataframeDoctestRunner.summary"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.dataframe.doctests.BeamDataframeDoctestRunner.summary" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="apache_beam.dataframe.doctests.AugmentedTestResults"> |
| <em class="property">class </em><code class="descclassname">apache_beam.dataframe.doctests.</code><code class="descname">AugmentedTestResults</code><a class="reference internal" href="_modules/apache_beam/dataframe/doctests.html#AugmentedTestResults"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.dataframe.doctests.AugmentedTestResults" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">doctest.TestResults</span></code></p> |
| <p>Create new instance of TestResults(failed, attempted)</p> |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="apache_beam.dataframe.doctests.Summary"> |
| <em class="property">class </em><code class="descclassname">apache_beam.dataframe.doctests.</code><code class="descname">Summary</code><span class="sig-paren">(</span><em>failures=0</em>, <em>tries=0</em>, <em>skipped=0</em>, <em>error_reasons=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/dataframe/doctests.html#Summary"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.dataframe.doctests.Summary" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> |
| <dl class="method"> |
| <dt id="apache_beam.dataframe.doctests.Summary.result"> |
| <code class="descname">result</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/dataframe/doctests.html#Summary.result"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.dataframe.doctests.Summary.result" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="apache_beam.dataframe.doctests.Summary.summarize"> |
| <code class="descname">summarize</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/dataframe/doctests.html#Summary.summarize"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.dataframe.doctests.Summary.summarize" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="function"> |
| <dt id="apache_beam.dataframe.doctests.parse_rst_ipython_tests"> |
| <code class="descclassname">apache_beam.dataframe.doctests.</code><code class="descname">parse_rst_ipython_tests</code><span class="sig-paren">(</span><em>rst</em>, <em>name</em>, <em>extraglobs=None</em>, <em>optionflags=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/dataframe/doctests.html#parse_rst_ipython_tests"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.dataframe.doctests.parse_rst_ipython_tests" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Extracts examples from an rst file and produce a test suite by running |
| them through pandas to get the expected outputs.</p> |
| </dd></dl> |
| |
| <dl class="function"> |
| <dt id="apache_beam.dataframe.doctests.test_rst_ipython"> |
| <code class="descclassname">apache_beam.dataframe.doctests.</code><code class="descname">test_rst_ipython</code><span class="sig-paren">(</span><em>rst</em>, <em>name</em>, <em>report=False</em>, <em>wont_implement_ok=()</em>, <em>not_implemented_ok=()</em>, <em>skip=()</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/dataframe/doctests.html#test_rst_ipython"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.dataframe.doctests.test_rst_ipython" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Extracts examples from an rst file and run them through pandas to get the |
| expected output, and then compare them against our dataframe implementation.</p> |
| </dd></dl> |
| |
| <dl class="function"> |
| <dt id="apache_beam.dataframe.doctests.teststring"> |
| <code class="descclassname">apache_beam.dataframe.doctests.</code><code class="descname">teststring</code><span class="sig-paren">(</span><em>text</em>, <em>wont_implement_ok=None</em>, <em>not_implemented_ok=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/dataframe/doctests.html#teststring"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.dataframe.doctests.teststring" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="function"> |
| <dt id="apache_beam.dataframe.doctests.teststrings"> |
| <code class="descclassname">apache_beam.dataframe.doctests.</code><code class="descname">teststrings</code><span class="sig-paren">(</span><em>texts</em>, <em>report=False</em>, <em>**runner_kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/dataframe/doctests.html#teststrings"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.dataframe.doctests.teststrings" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="function"> |
| <dt id="apache_beam.dataframe.doctests.set_pandas_options"> |
| <code class="descclassname">apache_beam.dataframe.doctests.</code><code class="descname">set_pandas_options</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/dataframe/doctests.html#set_pandas_options"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.dataframe.doctests.set_pandas_options" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="function"> |
| <dt id="apache_beam.dataframe.doctests.with_run_patched_docstring"> |
| <code class="descclassname">apache_beam.dataframe.doctests.</code><code class="descname">with_run_patched_docstring</code><span class="sig-paren">(</span><em>target=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/dataframe/doctests.html#with_run_patched_docstring"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.dataframe.doctests.with_run_patched_docstring" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="function"> |
| <dt id="apache_beam.dataframe.doctests.testfile"> |
| <code class="descclassname">apache_beam.dataframe.doctests.</code><code class="descname">testfile</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/dataframe/doctests.html#testfile"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.dataframe.doctests.testfile" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Run all pandas doctests in the specified file.</p> |
| <p>Arguments <cite>skip</cite>, <cite>wont_implement_ok</cite>, <cite>not_implemented_ok</cite> are all in the |
| format:</p> |
| <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span> |
| <span class="s2">"module.Class.method"</span><span class="p">:</span> <span class="p">[</span><span class="s1">'*'</span><span class="p">],</span> |
| <span class="s2">"module.Class.other_method"</span><span class="p">:</span> <span class="p">[</span> |
| <span class="s1">'instance.other_method(bad_input)'</span><span class="p">,</span> |
| <span class="s1">'observe_result_of_bad_input()'</span><span class="p">,</span> |
| <span class="p">],</span> |
| <span class="p">}</span> |
| </pre></div> |
| </div> |
| <p><cite>‘*’</cite> indicates all examples should be matched, otherwise the list is a list |
| of specific input strings that should be matched.</p> |
| <p>All arguments are kwargs.</p> |
| <table class="docutils field-list" frame="void" rules="none"> |
| <col class="field-name" /> |
| <col class="field-body" /> |
| <tbody valign="top"> |
| <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
| <li><strong>optionflags</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.10)"><em>int</em></a>) – Passed through to doctests.</li> |
| <li><strong>extraglobs</strong> (<em>Dict</em><em>[</em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><em>str</em></a><em>,</em><em>Any</em><em>]</em>) – Passed through to doctests.</li> |
| <li><strong>use_beam</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.10)"><em>bool</em></a>) – If true, run a Beam pipeline with partitioned input to |
| verify the examples, else use PartitioningSession to simulate |
| distributed execution.</li> |
| <li><strong>skip</strong> (<em>Dict</em><em>[</em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><em>str</em></a><em>,</em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><em>str</em></a><em>]</em>) – A set of examples to skip entirely.</li> |
| <li><strong>wont_implement_ok</strong> (<em>Dict</em><em>[</em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><em>str</em></a><em>,</em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><em>str</em></a><em>]</em>) – A set of examples that are allowed to |
| raise WontImplementError.</li> |
| <li><strong>not_implemented_ok</strong> (<em>Dict</em><em>[</em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><em>str</em></a><em>,</em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><em>str</em></a><em>]</em>) – A set of examples that are allowed to |
| raise NotImplementedError.</li> |
| </ul> |
| </td> |
| </tr> |
| <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">A doctest result describing the passed/failed tests.</p> |
| </td> |
| </tr> |
| <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">TestResults</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </dd></dl> |
| |
| <dl class="function"> |
| <dt id="apache_beam.dataframe.doctests.testmod"> |
| <code class="descclassname">apache_beam.dataframe.doctests.</code><code class="descname">testmod</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/dataframe/doctests.html#testmod"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.dataframe.doctests.testmod" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Run all pandas doctests in the specified module.</p> |
| <p>Arguments <cite>skip</cite>, <cite>wont_implement_ok</cite>, <cite>not_implemented_ok</cite> are all in the |
| format:</p> |
| <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span> |
| <span class="s2">"module.Class.method"</span><span class="p">:</span> <span class="p">[</span><span class="s1">'*'</span><span class="p">],</span> |
| <span class="s2">"module.Class.other_method"</span><span class="p">:</span> <span class="p">[</span> |
| <span class="s1">'instance.other_method(bad_input)'</span><span class="p">,</span> |
| <span class="s1">'observe_result_of_bad_input()'</span><span class="p">,</span> |
| <span class="p">],</span> |
| <span class="p">}</span> |
| </pre></div> |
| </div> |
| <p><cite>‘*’</cite> indicates all examples should be matched, otherwise the list is a list |
| of specific input strings that should be matched.</p> |
| <p>All arguments are kwargs.</p> |
| <table class="docutils field-list" frame="void" rules="none"> |
| <col class="field-name" /> |
| <col class="field-body" /> |
| <tbody valign="top"> |
| <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
| <li><strong>optionflags</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.10)"><em>int</em></a>) – Passed through to doctests.</li> |
| <li><strong>extraglobs</strong> (<em>Dict</em><em>[</em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><em>str</em></a><em>,</em><em>Any</em><em>]</em>) – Passed through to doctests.</li> |
| <li><strong>use_beam</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.10)"><em>bool</em></a>) – If true, run a Beam pipeline with partitioned input to |
| verify the examples, else use PartitioningSession to simulate |
| distributed execution.</li> |
| <li><strong>skip</strong> (<em>Dict</em><em>[</em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><em>str</em></a><em>,</em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><em>str</em></a><em>]</em>) – A set of examples to skip entirely.</li> |
| <li><strong>wont_implement_ok</strong> (<em>Dict</em><em>[</em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><em>str</em></a><em>,</em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><em>str</em></a><em>]</em>) – A set of examples that are allowed to |
| raise WontImplementError.</li> |
| <li><strong>not_implemented_ok</strong> (<em>Dict</em><em>[</em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><em>str</em></a><em>,</em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><em>str</em></a><em>]</em>) – A set of examples that are allowed to |
| raise NotImplementedError.</li> |
| </ul> |
| </td> |
| </tr> |
| <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">A doctest result describing the passed/failed tests.</p> |
| </td> |
| </tr> |
| <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">TestResults</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </dd></dl> |
| |
| </div> |
| |
| |
| </div> |
| |
| </div> |
| <footer> |
| |
| <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> |
| |
| <a href="apache_beam.dataframe.expressions.html" class="btn btn-neutral float-right" title="apache_beam.dataframe.expressions module" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> |
| |
| |
| <a href="apache_beam.dataframe.convert.html" class="btn btn-neutral float-left" title="apache_beam.dataframe.convert module" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> |
| |
| </div> |
| |
| |
| <hr/> |
| |
| <div role="contentinfo"> |
| <p> |
| © Copyright |
| |
| </p> |
| </div> |
| Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. |
| |
| </footer> |
| |
| </div> |
| </div> |
| |
| </section> |
| |
| </div> |
| |
| |
| |
| <script type="text/javascript"> |
| jQuery(function () { |
| SphinxRtdTheme.Navigation.enable(true); |
| }); |
| </script> |
| |
| |
| |
| |
| |
| |
| </body> |
| </html> |